"MySQL" MySQL 5.7+ version initialization

Source: Internet
Author: User

MySQL 5.7. More than 7 binary packages do not include the original data directory initialization system table, official website Description:

Http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysql-install-db.html

April 2016 MySQL official the latest 5.7 stable version is 5.7.12, previously used in 5.5 versions.

Initialization process:

[[Email protected]_d10014787 mysql]#Tar-ZXVF mysql-5.7. A-LINUX-GLIBC2.5-x86_64.Tar. Gz[[email protected]_d10014787 mysql]#CP-R mysql-5.7. A-LINUX-GLIBC2.5-x86_64/usr/local/mysql57[[email protected]_d10014787 mysql]# cd/usr/local/mysql57[[email protected]_d10014787 mysql]#./bin/mysqld--defaults-file=/ETC/MY_5712.CNF--initialize--user=MySQL or [[email protected]_d10014787 mysql]#./bin/mysqld--datadir=/data/mysql/5712_test--basedir=/usr/local/mysql57--initialize--user=MySQL
Note A line is written to the ErrLog after initialization, and there is an initialized [email protected] password [note] A temporary password is generated for[Email protected]: r.o.pz8p*r>3Chown-R mysql.mysql/data/mysql/5712_test[[email protected]_d10014787 mysql]#./bin/mysqld_safe--defaults-file=/ETC/MY_5712.CNF &[Email protected]_d10014787 mysql]#./bin/mysql-uroot-p-S Mysql.sock
You must reset the root password for any operation MySQL> ALTER user [email protected] identified by'123';

Personal feelings This initialization increases the difficulty in automating deployment ...

"MySQL" MySQL 5.7+ version initialization

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.