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