暂无图片
分享
LEE
2020-02-26
mysql连接中断疑问?
暂无图片 5M

mysql 5.7.28 社区版
长时间不连接服务端,客户端会出现连接中断,设置参数240小时 期间还是会出现中断,还有哪些参数要设置吗?
mysql> show variables like ‘%timeout%’;
±----------------------------±---------+
| Variable_name | Value |
±----------------------------±---------+
| connect_timeout | 10 |
| delayed_insert_timeout | 300 |
| have_statement_timeout | YES |
| innodb_flush_log_at_timeout | 1 |
| innodb_lock_wait_timeout | 10 |
| innodb_rollback_on_timeout | OFF |
| interactive_timeout | 864000 |
| lock_wait_timeout | 31536000 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| rpl_stop_slave_timeout | 31536000 |
| slave_net_timeout | 60 |
| wait_timeout | 864000 |
±----------------------------±---------+
13 rows in set (0.01 sec)

收藏
分享
4条回答
默认
最新
LEE

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)
[mysql@localhost ~]$ ps -ef | grep mysql
root 2185 1 0 09:03 ? 00:00:00 su - mysql
mysql 2186 2185 0 09:03 ? 00:00:00 -bash
mysql 2250 2186 0 09:04 ? 00:00:01 ./mysqld --skip-grant-tables
root 3119 3075 0 09:49 pts/0 00:00:00 su - mysql
mysql 3120 3119 0 09:49 pts/0 00:00:00 -bash
mysql 3169 3120 0 09:49 pts/0 00:00:00 ps -ef
mysql 3170 3120 0 09:49 pts/0 00:00:00 grep --color=auto mysql

暂无图片 评论
暂无图片 有用 0
Cui Hulong

1.所为的客户端指的是mysql客户端,第三方工具,还是应用?
2.mysql的timeout参数基本有两个控制:
interactive_timeout针对交互式连接,wait_timeout针对非交互式连接。mysql客户端连接数据库是交互式连接,通过jdbc连接数据库是非交互式连接。
3.还有可能就是系统一些的问题,存在。要一个一个排查一下。

暂无图片 评论
暂无图片 有用 0
LEE

mysql启动未使用 &后台运行 导致,谢谢专家

暂无图片 评论
暂无图片 有用 0
LEE
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏