Pre-Installation Preparation:
1. Verify that MySQL is installed:
| grep MySQL
2. Delete the system's own MySQL and its dependent commands:
Yum-y Remove mysql-libs.x86_64
3, confirm whether to delete clean:
Find/-name MySQL
4, if there is no delete clean and then delete
rm-rf/var/lib/-rf/var/lib/-rf/usr/lib64/-fr/usr/include/mysql
Note:/ETC/MY.CNF will not be removed after uninstallation, manual removal is required
Rm-rf/etc/my.cnf
5. Add the RPM source to CentOS and select a newer source command:
wget dev.mysql.com/get/mysql-community-release-el6-5. Noarch.rpmyum localinstall MySQL- Community-release-el6-5. noarch.rpm | grep mysql yum-config-manager--disable mysql55- Community Yum-config-manager--enable mysql56-Community Yum-config-manager-- Disable mysql57-| grep MySQL
If you are prompted that Yum-config-manager cannot execute, install the Yum Directive Toolkit:
Yum-y Install Yum-utils
Installation phase:
1. Install MySQL server command
Yum Install Mysql-community-server
2. Start MySQL
3. Check if MySQL is self-booting, and set the self-start command to open
Chkconfig--list | grep mysqld
2, 3, 4 are on to automatically start the boot
Set boot auto-start
Version 4, 5.6 to initialize the security settings:
Mysql_secure_installation
Here you can set the root password
5. Login Root Account:
Enter the password you set earlier
6. Establish a root user that can be connected remotely
CentOS6.8 installing MySQL 5.6