mysql 登录报错 ERROR 2002

tomshen 发布于 2012/01/09 12:28
阅读 1K+
收藏 0

系统中有mysql数据库,今天登录的时候,报错:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'(2)

我查看过,在/tmp中有mysql.sock,是一个连接:

mysql.sock --> /var/lib/mysqld/mysqld.sock

我google了,好像提议kill掉mysql进程,然后重启。

我想确认,是否有不重启解决的方案?

我查看了DB.err文件。这些错误信息和2002错误有关吗?

111205 15:30:03 mysqld_safe Starting mysqld daemon with databases from /usr/loca
l/mysql/var/
111205 15:30:03 [Warning] '--skip-locking' is deprecated and will be removed in
a future release. Please use '--skip-external-locking' instead.
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
111205 15:30:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgr
ade to create it.
111205 15:30:04 [ERROR] /usr/local/mysql/libexec/mysqld: unknown variable 'innod
b_data_home_dir=/usr/local/mysql/var/'
111205 15:30:04 [ERROR] Aborting

111205 15:30:04 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

111205 15:30:04 mysqld_safe mysqld from pid file /usr/local/mysql/var//DB.pid en
ded
111205 15:30:13 mysqld_safe Starting mysqld daemon with databases from /usr/loca
l/mysql/var/
111205 15:30:13 [Warning] '--skip-locking' is deprecated and will be removed in
a future release. Please use '--skip-external-locking' instead.
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
111205 15:30:13 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgr
ade to create it.
111205 15:30:13 [ERROR] /usr/local/mysql/libexec/mysqld: unknown variable 'innod
b_data_home_dir=/usr/local/mysql/var/'
111205 15:30:13 [ERROR] Aborting

111205 15:30:13 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

111205 15:30:13 mysqld_safe mysqld from pid file /usr/local/mysql/var//DB.pid en
ded

以下是问题补充:

@tomshen:我查看了/tmp文件夹,发现一个软连接: mysql.sock -> /var/lib/mysqld/mysqld.sock 但是我查询了系统,mysqld.sock是在/var/lib/mysql/mysqld.sock 是否重建这个软连接就可以了? 重建是会不会影响系统? (2012/01/09 13:22)
加载中
0
Z
ZYud
rm /usr/local/mysql/var//DB.pid
返回顶部
顶部