centos6.5 installation mysql5.6

Source: Internet
Author: User
Tags gpg yum repolist

1. Check the version number first
# uname -a
2. Download and install the Yum repository for MySQL

Download the Yum repository for MySQL

http://dev.mysql.com/downloads/repo/yum/

Then install this list of warehouses

3. Search for an installable MySQL version

After executing this command, you can see the installable MySQL:

# yum repolist enabled | grep "mysql.*-community.*"

If we are going to install the latest version, we can do it directly

# sudo yum install mysql-community-server

If we are going to choose a version, we can start by following this command to see which versions are available:

# yum repolist all | grep mysql

If you want to choose a version, there are two ways, one is to use the command to

$ sudo yum-config-manager --disable mysql56-community$ sudo yum-config-manager --enable mysql57-community-dmr

This command is to enable the 5.7 version in the warehouse, disable the 5.6 version of the book Warehouse
or edit the/etc/yum.repos.d/mysql-community.repo file

Enabled=0 means disable
For example, to install the 5.7 version of MySQL, to determine 5.6 of the enabled=0,5.7 enabled=1, one guarantee only one sub-warehouse enabled

# Note: MySQL 5.7 is currently in development. For use at your own risk.# Please read with sub pages: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/[mysql57-community-dmr]name=MySQL 5.7 Community Server Development Milestone Releasebaseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

And then we can install MySQL happily again.

$ sudo yum install mysql-community-server

After the installation is complete, we start MySQL

$ sudo service mysqld start

View MySQL Status

$ sudo service mysqld status

Start the MySQL service and initialize:

# /etc/init.d/mysqld startInitializing MySQL database: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/bin/mysqladmin -u root password ‘new-password‘/usr/bin/mysqladmin -u root -h iZ94vana2fdZ password ‘new-password‘Alternatively you can run:/usr/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.Please report any problems at http://bugs.mysql.com/[ OK ]Starting mysqld: [ OK ]
4. Related commands

Start the MySQL service

# service mysqld start

Restart MySQL Service

# service mysqld restart

Stop MySQL Service

# service mysqld stop

centos6.5 installation mysql5.6

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.