[root@localhost bin]# ./mysqld --initialize --user=mysql
2019-09-16T06:15:28.835202Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-09-16T06:15:28.843107Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2019-09-16T06:15:28.843150Z 0 [ERROR] Aborting
解决方案:
找到my.cnf中datadir=/usr/local/mysql/data
将/usr/local/mysql/data下文件全部删除
重新初始化
eg: cd /usr/local/mysql/bin
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data