您好,登錄后才能下訂單哦!
2017-07-28T12:46:35.138596Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
其實這個報錯在安裝的初始化的時候就已經(jīng)有了(在第一篇安裝的文章中能看到),只不過沒有影響安裝和啟動,所以并沒有管,以為只是安裝的時候檢查類的報錯,后來在重啟mysql發(fā)現(xiàn)在error日志里面也會出現(xiàn)這個報錯
解決方法:
在mysql官方網(wǎng)站上找到這么一段話
Those nonstandard behaviors remain the default for TIMESTAMP but as of MySQL 5.6.6 are deprecated and this warning appears at startup:
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use --explicit_defaults_for_timestamp server option (see
documentation for more details).
As indicated by the warning, to turn off the nonstandard behaviors,
enable the new explicit_defaults_for_timestamp system variable at server startup.
With this variable enabled, the server handles TIMESTAMP as follows instead:
這段話的意思是在5.6以后有這么一項檢查,所以要開啟標準的 explicit_defaults_for_timestamp功能,但是默認是關(guān)閉的。
在my.cnf中加入
[mysqld]
explicit_defaults_for_timestamp=true
如果還是報錯,按mysql提示的執(zhí)行下面的mysql啟動命令:
./bin/mysqld_safe --user=mysql --explicit_defaults_for_timestamp=1 &
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。