How to install mysql 5.6.21 in Centos 6.5

Source: Internet
Author: User

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.