错误MySQL CentOS - 启动MySQLCould找不到MySQL服务器

时间:2014-08-29 17:54:44

标签: mysql centos

我无法在mysql中进行任何操作:

root@server2 [~]# /etc/init.d/mysql status
MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]
root@server2 [~]# /etc/init.d/mysql restart
MySQL server PID file could not be found!                  [FAILED]
/etc/init.d/mysql: line 301: cd: /usr/local/mysql: No such file or directory
Starting MySQLCouldn't find MySQL server (/usr/local/mysql/[FAILED]ld_safe)
root@server2 [~]# /etc/init.d/mysql stop
MySQL server PID file could not be found!                  [FAILED]
root@server2 [~]# /etc/init.d/mysql start
/etc/init.d/mysql: line 301: cd: /usr/local/mysql: No such file or directory
Starting MySQLCouldn't find MySQL server (/usr/local/mysql/[FAILED]ld_safe)
root@server2 [~]# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

我的文件/etc/my.cnf:

root@server2 [~]# cat /etc/my.cnf
[mysqld]
user = mysql
basedir = /usr/local/mysql
skip-external-locking
key_buffer = 384M
max_allowed_packet=268435456
max_connections = 500
max_user_connections = 35
wait_timeout=40
connect_timeout=10
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
thread_concurrency = 8
server-id       = 1
skip-innodb

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

在一些帖子中搜索,我发现某些程序可能正在持有mysql。按照检查的命令:

root@server2 [~]# lsof | grep mysql
tailwatch 20718      root  mem       REG        3,5    206553    8922204 /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int/auto/DBD/mysql/mysql.so

yum info mysql-server

root@server2 [~]# yum info mysql-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.aol.com
 * extras: centos.chi.host-engine.com
 * updates: mirror.lug.udel.edu
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list

其他信息..

  • 没有运行mysql的进程。
  • CentOS版本5.10(最终版)
  • 我已删除扩展名为.err的文件并再次尝试。但它没有用。
  • 当我尝试在安全模式下启动mysql时,显然没有错误。但仍然不起作用,任何后续操作都不起作用。

0 个答案:

没有答案