CentOS 6.7 Installation MySQL 5.7

Source: Internet
Author: User

STEP1: Check whether the system comes with the installation of MySQL

# yum list installed | grep mysql

STEP2: Delete the system's own MySQL and its dependencies
Command:

# yum -y remove mysql-libs.x86_64

STEP3: Download mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz

STEP4: Unzip the mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz and rename it to MySQL and put it in the/usr/local directory

STEP5:

Add MySQL users and groups, then install MySQL and start, the initial password is saved by/root/.mysql_secret, using the following command:

Groupadd MySQL

Useradd mysql-g MySQL

Cd/usr/local/mysql/bin

Yum Install Libaio

./mysql_install_db--user=mysql--basedir=/usr/local/mysql/--datadir=/usr/local/mysql/data

Cd/usr/local/mysql/support-files

./mysql.server Start

STOP6:

Log in to MySQL with the initial password and change the password while setting root to connect remotely

The command is as follows:

Cat/root/.mysql_secret

Cd/usr/local/mysql/bin

./mysql-u Root-p

Set Password =password (' new password ');

GRANT all privileges on * * to [email protected] '% ' identified by ' 1 new password ';

Flush privileges;

may not connect remotely, try to shut down the firewall, the command is as follows:

Service Iptables Stop

Setenforce 0

Step 7:

SR sets MySQL to boot and adds a soft connection

The command is as follows:

cd/usr/local/mysql/support-files/

CP MYSQL.SERVER/ETC/INIT.D

Cd/etc/init.d

MV Mysql.server mysqld

Cd/usr/bin

Ln-s/usr/local/mysql/bin/mysql MySQL

Reference:

Http://jingyan.baidu.com/article/e5c39bf5aa60f639d7603316.html

Http://wenku.baidu.com/link?url=pyNWlzvD9_E-PSupm34oC0DwsZ_ Zxsrlibvagcioruaueajqvdbqqkw912bypwcxpgip9eiwsxvx9cqtzswxvsu3zywnnzffrvmbazjljvg

CentOS 6.7 Installation MySQL 5.7

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.