centos7安装mysql初始化报错


[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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM