How to install mysql 5.6.21 in Centos 6.5
Create a directory for downloading the rpm package:
# mkdir -p /taokey/tools/
Check whether the mysql package is included in the system. If yes, delete it.
# rpm -qa|grep mysqlmysql-libs-5.1.71-1.el6.x86_64mysql-server-5.1.71-1el6.x86_64# yum remove mysql-server mysql-libs#rpm -qa|grep mysql#
This indicates that there is no mysql package. If you have installed mysql and deleted the package, you still need to perform the following operations.
# find / -name myslq/var/lib/mysql/var/lib/mysql/mysql/var/lock/subsgs/myslq# rm -rf /var/lib/mysql# rm -rf /vra/lib/mysql/mysql
Check whether the installation directory of myslq is deleted.
# find / -name mysql
You also need to download three packages from the official website:
Install these three packages:
# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm#rpm -ivh MySQL-client-5.6.21-1.rhel5.x86_64.rpm# rpm -ivh MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
If an error is reported, install the libaio package
#yum -y install libaio
Initialize mysql
# /usr/bin/mysql_install_db
View the initial password of mysql
# Less/root/. mysql press the Tab key, and then press a string of characters after the colon "Enter", which is the mysql password.
Log on to mysql and change the password.
mysql -uroot -pF6K3v_xggFoLQeiN
Go to mysql to change the password
mysql> SET PASSWORD=PASSWORD('123.COM');mysql> exitBye
Log in and check whether the password has been changed successfully:
# Mysql-uroot-p123.com set mysql startup # chkconfig mysql on # chkconfig mysql -- list
The installation of mysql 5.6.21 is complete. Thank you!
The above section describes how to install mysql 5.6.21 in Centos 6.5. I hope it will help you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!