How does linux CentOS6.5 yum install mysql5.6?

Source: Internet
Author: User
Tags yum repolist

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

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.