报这个错connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (11)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!帮我看下这到底是怎么回事,明明这个/tmp/mysql.sock是OK的,而且我是早上看的,根本网站没什么流量,我都怀疑是被攻击了... 迷茫...
贴出mysql日志和apache日志,linux发行版本。
080417 18:32:25 mysqld started InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 080417 18:32:25 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 080417 18:32:26 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 080417 18:32:26 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... 080417 19:35:49 mysqld started InnoDB: No valid checkpoint found. InnoDB: If this error appears when you are creating an InnoDB database, InnoDB: the problem may be that during an earlier attempt you managed InnoDB: to create the InnoDB data files, but log file creation failed. InnoDB: If that is the case, please refer to InnoDB: http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html 080417 19:35:50 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 080417 19:35:50 mysqld ended080417 19:41:52 mysqld started /usr/local/mysql/libexec/mysqld: Too many arguments (first extra is 'user=mysql'). Use --help to get a list of available options 080417 19:41:52 mysqld ended080417 19:43:32 mysqld started InnoDB: No valid checkpoint found. InnoDB: If this error appears when you are creating an InnoDB database, InnoDB: the problem may be that during an earlier attempt you managed InnoDB: to create the InnoDB data files, but log file creation failed. InnoDB: If that is the case, please refer to InnoDB: http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html 080417 19:43:32 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 080417 19:43:33 mysqld ended080417 19:46:49 mysqld started InnoDB: No valid checkpoint found. InnoDB: If this error appears when you are creating an InnoDB database, InnoDB: the problem may be that during an earlier attempt you managed InnoDB: to create the InnoDB data files, but log file creation failed. InnoDB: If that is the case, please refer to InnoDB: http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html "localhost.localdomain.err" 177L, 10059C
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
my.cnf配置如下[client] default-character-set=utf8 #password = your_password port = 3306 socket = /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL server [mysqld] default-character-set=utf8 skip-name-resolve skip-grant-tables port = 3306 socket = /tmp/mysql.sock skip-locking key_buffer_size = 128M table_cache = 256 sort_buffer_size = 8M net_buffer_length = 16K read_buffer_size = 8M read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M connect_timeout = 20 max_connections = 1024 wait_timeout = 20 interactive_timeout = 10 query_cache_size = 64M log-slow-queries = /usr/local/mysql/slowquery.log long_query_time = 2
CPU E2140 双核1.6G/PD2.8G 双核 内存 1G DDR II 硬盘 SATA-160GB 网卡 1000M×2 服务器尺寸 1U 硬盘分区 Linux 2G SWAP 其余剩余服务器就这配置...
手动映射一个mysql.sock文件到你的tmp目录下。1. stop mysql 2. run the commands# cd /tmp # ln -s /var/lib/mysql/mysql.sock mysql.sock //根据你的版本找到你的原始文件地址映射。 3. start mysql
我用过appserv的套件,安装好以后在MYSQL 的安装目录下有个my-huge.ini my-huge.ini my-innodb-heavy-4G.ini这几个配置文件。你可以参考一下
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (11)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!帮我看下这到底是怎么回事,明明这个/tmp/mysql.sock是OK的,而且我是早上看的,根本网站没什么流量,我都怀疑是被攻击了...
迷茫...
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
080417 18:32:25 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080417 18:32:26 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080417 18:32:26 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080417 19:35:49 mysqld started
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html
080417 19:35:50 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
080417 19:35:50 mysqld ended080417 19:41:52 mysqld started
/usr/local/mysql/libexec/mysqld: Too many arguments (first extra is 'user=mysql').
Use --help to get a list of available options
080417 19:41:52 mysqld ended080417 19:43:32 mysqld started
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html
080417 19:43:32 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
080417 19:43:33 mysqld ended080417 19:46:49 mysqld started
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/error-creating-innodb.html
"localhost.localdomain.err" 177L, 10059C
default-character-set=utf8
#password = your_password
port = 3306
socket = /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL server
[mysqld]
default-character-set=utf8
skip-name-resolve
skip-grant-tables
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer_size = 128M
table_cache = 256
sort_buffer_size = 8M
net_buffer_length = 16K
read_buffer_size = 8M
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
connect_timeout = 20
max_connections = 1024
wait_timeout = 20
interactive_timeout = 10
query_cache_size = 64M
log-slow-queries = /usr/local/mysql/slowquery.log
long_query_time = 2
这个问题 ,我以前也碰到过。我上次的解决办法跟权限有关,正巧前两周硬盘坏了。。上次怎么解决就在硬盘上记录的。。
我linux一般用的版本是RH4和ubuntu 8.03。想赚点你的分都不行了,太巧和了,和我一样的错误。
E2140 双核1.6G/PD2.8G 双核
内存
1G DDR II
硬盘
SATA-160GB
网卡
1000M×2
服务器尺寸
1U
硬盘分区
Linux 2G SWAP 其余剩余服务器就这配置...
2. run the commands# cd /tmp
# ln -s /var/lib/mysql/mysql.sock mysql.sock //根据你的版本找到你的原始文件地址映射。
3. start mysql
这个很重要的。。
ubuntu/centerOS/RH/Solaris/每个发行版本的情况都不一样的哦。