linux下初始化mysql時報錯


執行mysqld --initialize后報錯

報錯內容:

019-04-24 18:07:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-04-24 18:07:59 0 [Note] mysqld (mysqld 5.6.43) starting as process 16404 ...
2019-04-24 18:07:59 16404 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2019-04-24 18:07:59 16404 [ERROR] Aborting

2019-04-24 18:07:59 16404 [Note] Binlog end
2019-04-24 18:07:59 16404 [Note] mysqld: Shutdown complete

 

解決辦法:

使用vi /etc/my.cnf ,加上兩行:

explicit_defaults_for_timestamp=true

user=mysql                          (指定mysql用戶來啟動mysql服務)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM