I checked this page: http://dev.mysql.com/doc/refman/5.7/en/mysql-install-db.html
mysql_install_db
is removed, however, when I use mysqld --initialize
. It promotes these errors and warning.
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[ERROR] --initialize specified but the data directory has files in it. Aborting.
[ERROR] Aborting
The first one can be ignored according to this:How to enable explicit_defaults_for_timestamp?
I don't know how to solve the second problem.
After MySQL is installed, the data directory must be initialized, including the tables in the mysql system database: For some MySQL installation methods, data directory initialization is automatic, as described in Chapter 3, Postinstallation Setup and Testing.
Pls, read error carefully:
[ERROR] --initialize specified but the data directory has files in it. Aborting.
Your directory is not empty. You have to remove all the contents of it or choose another one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With