How does linux CentOS6.5 yum install mysql5.6?
1. Check whether mysql is installed on the new ECS instance.
# Yum list installed | grep mysql
2. If you find that the system comes with mysql, do it with determination.
# Yum-y remove mysql-libs.x86_64
3. run the command in the directory where your files are stored. Here we will explain that the mysql yum source server is abroad, so the download speed will be slow. Fortunately, mysql5.6 is only 79M large, mysql5.7 is m, so this is why I don't want to install mysql5.7.
# Wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
4. next, execute this sentence to explain that this rpm is not the mysql installation file, but only two yum source files. After the command is executed, in/etc/yum. repos. d/more mysql-community-source.repo and mysql-community.repo under this directory
# Rpm-ivh mysql-community-release-el6-5.noarch.rpm
5. At this time, you can run the yum repolist mysql command to check whether there are any mysql installable files.
# Yum repolist all | grep mysql
6. Install the mysql server command (all the way to yes ):
# Yum install mysql-community-server
7. After the installation is successful
# Service mysqld start
8. since the root user password of mysql is blank by default when mysql is just installed, We need to log on with the root user of mysql in time (the first enter key, no need to enter the password ), and change the password
# Mysql-u root
# Use mysql;
# Update user set password = PASSWORD ("Enter the root User password here") where user = 'root ';
# Flush privileges;
9. Check whether mysql is self-started and set to enable the self-startup command
# Chkconfig -- list | grep mysqld
# Chkconfig mysqld on
10. mysql Security Settings (the system will ask you a few questions all the way. If you do not understand the translation after copying, basically all the way to yes ):
# Mysql_secure_installation
11. Good night
# Bye