Mysql报错[Warning] TIMESTAMP with implicit DEFAULT value is deprecated和Buffered warning: Changed limit...

报错
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
则解决。

转载于:https://www.cnblogs.com/ccielife/p/10763123.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值