Mysql報錯[Warning] TIMESTAMP with implicit DEFAULT value is deprecated和Buffered warning: Changed limits


報錯
2019-04-24 12:06:46 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 12:06:46 0 [Note] /usr/sbin/mysqld (mysqld 5.6.43) starting as process 3924 ...
2019-04-24 12:06:46 3924 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
2019-04-24 12:06:46 3924 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

方法1
編輯/etc/security/limits.conf,加上下面2行
mysql hard nofile 65535
mysql soft nofile 65535

編輯/usr/lib/systemd/system/mysqld.service,加上下面1行
LimitNOFILE=65535

然后
systemctl daemon-reload
systemctl restart mysqld.service

進入mysql操作
mysql> show variables like '%file%';
如有| open_files_limit | 65535
則解決。


方法2(若方法1未能解決)
mkdir /etc/systemd/system/mysqld.service.d
touch limits.conf
加上
[Service]
LimitNOFILE = 65535

然后
systemctl daemon-reload
systemctl restart mysqld

進入mysql操作
mysql> show variables like '%file%';
如有| open_files_limit | 65535
則解決。


免責聲明!

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



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