linux CentOS6.5 yum Install mysql5.6

  • 2021-08-12 03:52:47
  • OfStack

This article shares the simple process of installing mysql 5.6 on linux yum for your reference. The specific contents are as follows

1. For the newly opened cloud server, it is necessary to check whether the system is equipped with mysql


# yum list installed | grep mysql

2. If you find that a system comes with mysql, do it decisively


# yum -y remove mysql-libs.x86_64

3. Execute under the directory where you store files casually, explain here 1, because this mysql yum source server is abroad, so the download speed will be slower, ok

mysql 5.6 is only 79M, while mysql 5.7 is 182M, so that's why I don't want to install mysql 5.7


# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

4. Then execute this sentence. Explain 1. This rpm is not the installation file of mysql, but only two yum source files. After execution, there are more mysql-community-source. repo and mysql-community. repo in/etc/yum. repos. d


# rpm -ivh mysql-community-release-el6-5.noarch.rpm

5. At this time, you can use the command yum repolist mysql to see if there are mysql installable files under 1


#yum repolist all | grep mysql

6. Install the mysql server command (1-way yes):


# yum install mysql-community-server

7. After successful installation


# service mysqld start

8. When mysql is just installed, the password of root user of mysql is empty by default, so we need to log in with root user of mysql in time (enter for the first time, without entering the password) and change the password


# mysql -u root
# use mysql;
# update user set password=PASSWORD(" Enter here root User password ") where User='root';
# flush privileges; 

9. Check whether mysql is self-starting and set the command to turn on self-starting


# chkconfig --list | grep mysqld
# chkconfig mysqld on

10. mysql security settings (the system will ask you a few questions in one way, but you can't understand the translation after copying, basically one way yes):


# mysql_secure_installation

Related articles: