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.
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.