MySQL社区

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 4780|回复: 1
打印 上一主题 下一主题

Error: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx'(4) Error:2003

[复制链接]
跳转到指定楼层
1#
发表于 2010-11-25 14:06:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
网站刷新的时候就会出现:
MySQL Error
Message: Can not connect to MySQL server
SQL:
Error: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx.' (4)
Errno.: 2003
Click here to seek help.
确定的是mysql 一定启动,而且能在shell 下登录mysql。而error日志却没有。error.log开启了。
mysql的配置文件,my.cnf

[root@localhost lib]# cat my.ini | grep ^[^#]
[client]
port            = 3306
socket          = /tmp/mysql.sock
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-external-locking
skip-name-resolve
key_buffer_size = 64M
max_allowed_packet = 100M
table_open_cache = 200
sort_buffer_size = 4M
net_buffer_length = 16K
read_buffer_size = 4M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
tmp_table_size = 1024M
max_heap_table_size = 1024M
max_connections=30000
thread_cache_size=8
thread_concurrency=16
long_query_time=1
slow_query_log=/var/log/mysql/slowquery.log
log-error=/var/log/mysql/log-error.log
relay-log=/var/log/mysql/localhost-relay-bin
server-id       = 1
tmpdir         = /var/tmp/mysql
[mysqldump]
quick
max_allowed_packet = 16M
wait_timeout=30
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 32M
sort_buffer_size = 32M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 分享淘帖 顶 踩
2#
发表于 2010-11-26 09:23:27 | 只看该作者
应该是用户权限问题。可能是没有从此xxx.xxx.xxx.xxx地址访问的权限。
这种情况与error.log无关,不会写入的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|申请友链|小黑屋|Archiver|手机版|MySQL社区 ( 京ICP备07012489号   
联系人:周生; 联系电话:13911732319

GMT+8, 2024-5-19 05:07 , Processed in 0.072714 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表