CentOS install MySQL 5.6 binary package installation

Source: Internet
Author: User

1 Download MySQL

Https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz

I downloaded MySQL 5.6.

2. Unzip it and move it to the corresponding directory

TAR-ZXVF mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz

CP./mysql-5.6.37-linux-glibc2.12-x86_64/usr/local/mysql

Create users and Groups

Groupadd MySQL and Useradd-r-G MySQL mysq

Enter the source directory

Cd/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64

Create data directory to hold MySQL

mkdir data

Modify directories for users and groups

Chown-r Mysql:mysql.

Copy this file into the INIT.D directory

Join the power-on self-starter

CP Support-files/mysql.server/etc/init.d/mysqld

Vi/etc/init.d/mysqld

Basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64

Datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data

Initialize MySQL

./scripts/mysql_install_db--use=mysql--basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64

--datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data

--defaults-file=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/my.cnf

Join the power-on self-starter

Chkconfig--add mysqld

Chkconfig--list mysqld

Start the MySQL service

Service mysqld Start

To see if it started successfully

Netstat-anp|grep mysqld

Go to MySQL

./bin/mysql-u Root


/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin-u root password ' new-password '

/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin-u root-h skinglzw password ' new-password '


CentOS install MySQL 5.6 binary package installation

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.