当前位置: 技术问答>linux和unix
系统安装的时候选了mysql,但是在setup里面找不到mysql的服务,进程还是有的,但是启动不了。
来源: 互联网 发布时间:2015-10-14
本文导语: 系统安装的时候选了mysql,但是在setup里面找不到mysql的服务,进程还是有的,但是重新启动不了。下面是我测试了n条命令的结果。大家看看这个怎么办啊 [root@jxds1234 vpopmail-5.2.1]# rpm -q mysql mysql-3.23.58-1 [root@jxds1234 ...
系统安装的时候选了mysql,但是在setup里面找不到mysql的服务,进程还是有的,但是重新启动不了。下面是我测试了n条命令的结果。大家看看这个怎么办啊
[root@jxds1234 vpopmail-5.2.1]# rpm -q mysql
mysql-3.23.58-1
[root@jxds1234 vpopmail-5.2.1]# ps -ef|grep mysqld
root 4137 4071 0 14:43 pts/0 00:00:00 grep mysqld
[root@jxds1234 vpopmail-5.2.1]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@jxds1234 vpopmail-5.2.1]# mysqladmin -u root password 1234
-bash: mysqladmin: command not found
[root@jxds1234 qmail]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@jxds1234 vpopmail-5.2.1]# rpm -q mysql
mysql-3.23.58-1
[root@jxds1234 vpopmail-5.2.1]# ps -ef|grep mysqld
root 4137 4071 0 14:43 pts/0 00:00:00 grep mysqld
[root@jxds1234 vpopmail-5.2.1]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@jxds1234 vpopmail-5.2.1]# mysqladmin -u root password 1234
-bash: mysqladmin: command not found
[root@jxds1234 qmail]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
|
要装mysql-server
#rpm -qa|grep mysql
php-mysql-4.1.2-7.3.6
mysqlclient9-3.23.22-8
mysql-3.23.58-1.73
mysql-devel-3.23.58-1.73
mysql-server-3.23.58-1.73
#rpm -qa|grep mysql
php-mysql-4.1.2-7.3.6
mysqlclient9-3.23.22-8
mysql-3.23.58-1.73
mysql-devel-3.23.58-1.73
mysql-server-3.23.58-1.73
|
没有安装mysql-server,如果安装了的话,还应该确保mysql-server是正常启动的,所报的错误就是因为mysql-server没有正常启动,可以使用/etc/init.d/mysql start启动。如果该目录下没有mysql,那就是没有安装了!