Mysql using yum install Linux system

1. Installation rpm package

Direct use of an advanced version of yum -y install command to install mysql mysql is not installed, you need to install the rpm package mysql5 series with the resources available in the community edition, enter the following command to install.

Command: RPM -Uvh  http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

 

 2. Check mysql version available

命令:yum repolist enabled | grep "mysql.*-community.*"

 

 3. Install mysql

Enter a command to start the installation mysql

命令:yum -y install mysql-community-server

You can use the command mysql to join start-up service (optional): systemctl enable mysqld

4. Turn mysql service

After a successful installation using the command to open service: systemctl start mysql

Use the mysql command to view the status: systemctl status mysql

 

 5. Create user and log

Create a user using the command: mysqladmin -uroot password root

 

 Will appear in the image above warning when users are created content, meaning that the use of passwords is not secure on the command-line interface, you can skip directly.

User login using mysql just created

 

 So far, CentOS7 system successfully install mysql

6. navicat connected mysql

Need to give users remote access to grant permission before using navicat connection mysql, mysql would otherwise be unable to connect

After Log on mysql, use the following commands for remote login authorization

grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;

 

 Navicat then connected mysql

 

 Permanently open port 3306: firewall-cmd --zone = public --add-port = 3306 / tcp --permanent

 

 See if there listening port usage: netstat -nalp | grep 3306

 

 

Then use the mysql connection was successful navicat

Guess you like

Origin www.cnblogs.com/pretty88/p/11584933.html