CentOS 7 installation MySQL Server 5.6

Source: Internet
Author: User

1. Install MySQL Server

Add the following file Mysql-community.repo file under the/etc/yum.repos.d/directory, as follows:

1 [mysql56-community] 2 name=mysql 5.6 Community Server 3 baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/ 4 enabled=1 5 gpgcheck=0

Execute the Yum install Mysql-community-server.

Start Services # service mysqld start

2. Set the password
1 [email protected] yl]# mysql-u root2 Welcome to the MySQL Monitor. Commands End With; or \g.3 Your MySQL Connection ID is 34 server version:5.6.26 MySQL Community Server (GPL)5 6 Copyright (c), Oracle and/or its affiliates. All rights reserved.7 8 Oracle is a registered trademark of the Oracle Corporation and/or its9 affiliates. Other names trademarks of their respectiveTen owners. One  A Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement. -  -mysql> set password for ' root ' @ ' localhost ' =password (' password ');
3. Remote connection Settings

Assign all permissions for all tables in all databases to the root user at all IP addresses.

Mysql> Grant all privileges on * * to [e-mail protected] '% ' identified by ' password ';

If you are a new user and not root, create a new user first

Mysql>create user ' username ' @ '% ' identified by ' password ';  
4. Close the firewall:
[Email protected] ~]# systemctl stop Firewalld.service #停止firewall
[Email protected] ~]# systemctl disable Firewalld.service #禁止firewall开机启动

The remote connection is now available.

CentOS 7 installation MySQL Server 5.6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.