• notice
  • Congratulations on the launch of the Sought Tech site

Method for installing mysql5.6.21 under CentOS6.5

Create a directory where you need to download the rpm package:

# mkdir -p/taokey/tools/

Check if the system comes with the mysql package.If so, delete it

# rpm -qa|grep mysql
mysql-libs-5.1.71-1.el6.x86_64
mysql-server-5.1.71-1el6.x86_64
# yum remove mysql-server mysql-libs
#rpm -qa|grep mysql
#

This means that there is no mysql package.If you have installed mysql, you still need to delete the package.

# 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 once to see if the installation directory of myslq is deleted

# find/-name mysql

You also need to download 3 packages on 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 and install it

#yum -y install libaio

Initialize mysql

#/usr/bin/mysql_install_db

View the initial password of mysql

# less/root/.mysql Press Tab again and press Enter The string of characters after the colon is the password of mysql

Log in to mysql to change password

mysql -uroot -pF6K3v_xggFoLQeiN

Enter mysql to modify password

mysql> SET PASSWORD=PASSWORD('123.COM');
mysql> exit
Bye

Log in to see if the password is changed successfully:

# mysql -uroot -p123.com
Set mysql to start at boot
# chkconfig mysql on
# chkconfig mysql --list

Install mysql 5.6.21 here.The installation is complete.Thank you all.

The above is the method of installing mysql 5.6.21 under Centos 6.5 that I introduced to you.I hope it will be helpful to you.If you have any questions, please leave me a message.I will reply to you in time.Thank you very much for your support to the website!

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+