mysql 不间断的出现 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '

shuiping567541 2014-11-04 09:12:00
数据库是 mysql 5.6
现在会不间断的出现
SQLSTATE[HY000] [2003] Can't connect to MySQL server on '192.168.1.106' (99)
但是刷新几下友好了,错误日志里也没有出现 "too many connections" 的提示
有时候刷新 十几次就会出现一次这样的情况。这是什么原因啊。

下面是我的 配置

# The following options will be passed to all MySQL clients
[client]
#password = your_password
#port = 7999
#socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
log-error = /data/mysql/log/mysql_error.log
basedir = /usr/local/mysql
datadir = /data/mysql/data
port = 7999
socket = /tmp/mysql.sock
skip-name-resolve = 1
skip-external-locking
key_buffer_size = 2048M
max_allowed_packet = 32M
table_open_cache = 512
sort_buffer_size = 16M
read_buffer_size = 32M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 128M
wait_timeout = 30
interactive_timeout = 20

default-storage-engine=innodb

# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 48

max_connections = 10000


# ---- bin log config ---- #
log-bin = /data/mysql/binlog/mysql-bin
expire_logs_days = 7
binlog-ignore-db=mysql
binlog-ignore-db=test
binlog-ignore-db=performance_schema
binlog-ignore-db=information_schema
# ---- bin log end ---- #

slow_query_log = 1
long_query_time = 1
slow_query_log_file = /data/mysql/log/slow_query.log

binlog_format = mixed

# -----innodb config begin----- #
innodb_log_group_home_dir = /data/mysql/innodblog
innodb_buffer_pool_size = 8192m
innodb_log_file_size = 8m
innodb_log_buffer_size = 8m
innodb_flush_log_at_trx_commit = 2
innodb_read_io_threads = 8
innodb_write_io_threads = 16
innodb_purge_threads = 8
innodb_lock_wait_timeout = 50
innodb_data_home_dir = /data/mysql/innodbdata
innodb_file_per_table = 1
...全文
449 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Rotel-刘志东 2014-11-04
  • 打赏
  • 举报
回复
max_connections = 10000‘ 最大连接设置一台机器最多不要超过1000.’
Rotel-刘志东 2014-11-04
  • 打赏
  • 举报
回复
防火墙没有允许设置或者没有执行权限原因
CT_LXL 2014-11-04
  • 打赏
  • 举报
回复
引用 楼主 shuiping567541 的回复:
有可能是selinux导致的, 用root账户执行: setsebool -P httpd_can_network_connect=1 试试

56,679

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧