Install MySQL database under Linux
Linux version: CentOS release 6.8 (Final)
MySQL version: mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
In the installation database, enter the start MySQL command:/usr/local/mysql/support-files/mysql.server start
Error message
Enterthe/usr/local/mysql/data directory to view the error log:
On the Internet to find solutions, tossing a turn or not, and later found in the initialization of the database step has been an error message:
Because there are files in the data file directory, which causes initialization to terminate, you must change the data directory to the owner of MySQL in case the data file directory is empty, the command is as follows:
1. Enter the Data directory:
2. Clear the Data directory:
3. Initialize the database:
In the red box above is a randomly generated MySQL login password
Then command:/usr/local/mysql/support-files/mysql.server Start, start the MySQL database.
Finally, change the root password:
# mysql–u root–p ---Connect mysql, enter the password generated when initializing
mysql> alter user ' root ' @' localhost ' identified by ' 123456 ';
Linux installation MySQL problem summary (a) Mysqld_safe mysqld from PID File/usr/local/mysql/data/mysql.pid ended