CentOS Notes-Install a specific version of MySQL

Source: Internet
Author: User

The CENTOS6 yum default installation of MySQL is version 5.1,

If you want to install version 5.6.16, there are three ways

1.yum mode,

The advantage of this approach is that it is easy to load and unload through Yum, and the downside is that the version cannot be elaborated, such as the official version of the Yum Library, only the mysql5.6.37 version

Download the Yum Library from MySQL for installation, reference: 1190000007667534

or http://www.cnblogs.com/a3470194/p/5480911.html.

Version Library Reference official website https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

A problem occurred during installation, Nokey problem, refer to Yum encountered Warning:rpmts_HdrFromFdno:Header V3 DSA Signature:nokey Workaround

After the installation is complete,

2. Install with RPM,

The advantage of this installation is that the version can be elaborated in detail, the disadvantage is the uninstall trouble point, so I use this way, detailed about the process

Refer to the CentOS6.5 system RPM package installation MySQL5.6

This installation is 5.6.21, change the version number can be

After the installation, the default configuration file in/usr/my.cnf (this directory may be different due to the system version of the difference, look at the installation log), we can copy into the/etc directory, CP/USR/MY.CNF/ETC/MY.CNF

Then execute/usr/bin/mysql_install_db to initialize MySQL

Log in the installation process to look carefully, temporary password in this file

/root/.mysql_secret

Installation is complete, start, will appear can not find mysql.sock, this problem did not study in depth, as long as the service command to start

Service MySQL Start

After entering MySQL, change the password

SET PASSWORD = PASSWORD (' xxxxx ');

After that, create a regular user and give permission

CREATE USER ' mysql ' @ '% ' identified by ' xxxxx ';

GRANT all on * * to ' mysql @ '% ';

Refer to MySQL create user and authorization method

3. Download the installation package, the SCP to the server, to install, and the second way a bit like, this applies to the version of the requirements of a more special scenario.

Benefits: Suitable for various versions of the installation; disadvantages: Installation Trouble, download trouble

CentOS Notes-Install a specific version of MySQL

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.