CentOS mysql5.7 Binary Package installation

Source: Internet
Author: User
Tags flush

This method of installation is very simple

Cd/usr/local

Download the installation package
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz

Extract
TAR-ZXVF mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz


[Email protected] local]# pwd
/usr/local
[[Email protected] local]# mv mysql-5.7.17-linux-glibc2.5-x86_64 MySQL


CD MySQL

Mkdir-p/data/mysql/data

Create a MySQL user

Useradd mysql-s/sbin/nologin-m (no home directory)

Chown-r Mysql.mysql/data/mysql

./bin/mysqld--initialize--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql/data

Prompt for initial password:
2017-03-29T15:09:12.116410Z 1 [Note] A temporary password is generated for [email protected]: EW/WX (<z>43l

Copy the startup script file

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

Set boot up

Chkconfig mysqld on

Chkconfig--list|grep mysqld
chmod 755/etc/init.d/mysqld

Configuring Environment variables
Echo ' path=/usr/local/mysql/bin/: $PATH ' >>/etc/profile

. /etc/profile

Go to MySQL:

Mysql-uroot-p EW/WX (<z>43l

Change Password
Alter user ' root ' @ ' localhost ' identified by ' 123456 ';

Flush privileges;

Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ';

FLUSH privileges;

CentOS mysql5.7 Binary Package installation

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.