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