2 wang100gui Wang100gui 于 2015.06.22 15:19 提问

fedora下安装mysql无法运行,缺少mysql.sock

系统以前可能安装过mysql,后来卸载了,也可能没安装过mysql。
总之在我安装之前用 rpm -qa|grep mysql查看,有mysql-libs和mysql-server两个。
我删掉这两个后,用yum -y install mysql && yum -y install mysql-server。安装,运行不了。
一下是我现在系统中的状态

 [root@s1 dsz]# rpm -qa|grep mysql
mysql-server-5.5.29-1.fc16.i686
mysql-5.5.29-1.fc16.i686
mysql-libs-5.5.29-1.fc16.i686
mysql-devel-5.5.29-1.fc16.i686

[root@s1 dsz]# ps -ef|grep mysqld
root      1923  1855  0 14:57 pts/0    00:00:00 grep --color=auto mysqld

[root@s1 dsz]# ps -aux|grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root      1931  0.0  0.0   6304   808 pts/0    S+   14:58   0:00 grep --color=auto mysql

[root@s1 dsz]# rpm -ql mysql
/usr/bin/msql2mysql
/usr/bin/my_print_defaults
/usr/bin/mysql
/usr/bin/mysql_config
/usr/bin/mysql_find_rows
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/bin/mysqlslap
/usr/lib/mysql/mysql_config
/usr/share/doc/mysql-5.5.29
/usr/share/doc/mysql-5.5.29/COPYING
/usr/share/doc/mysql-5.5.29/README
/usr/share/doc/mysql-5.5.29/README.mysql-docs
/usr/share/doc/mysql-5.5.29/README.mysql-license
/usr/share/man/man1/my_print_defaults.1.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysql_config.1.gz
/usr/share/man/man1/mysql_find_rows.1.gz
/usr/share/man/man1/mysql_waitpid.1.gz
/usr/share/man/man1/mysqlaccess.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlshow.1.gz
/usr/share/man/man1/mysqlslap.1.gz

[root@s1 dsz]# /etc/init.d/mysql start
bash: /etc/init.d/mysql: 没有那个文件或目录

[root@s1 dsz]# mysqladmin start
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

[root@s1 dsz]# rpm -qa mysql
mysql-5.5.29-1.fc16.i686

[root@s1 dsz]# service mysqld status
Redirecting to /bin/systemctl  status mysqld.service
mysqld.service - MySQL database server
      Loaded: loaded (/lib/systemd/system/mysqld.service; disabled)
      Active: inactive (dead)
      CGroup: name=systemd:/system/mysqld.service

[root@s1 dsz]# service mysqld start
Redirecting to /bin/systemctl  start mysqld.service
Job failed. See system logs and 'systemctl status' for details.

2个回答

Wang100gui
Wang100gui   2015.06.22 15:19

这个是在虚拟机中测试安装的。最终是要为集群安装,不可以重做系统。

qq_29223541
qq_29223541   2015.06.22 18:18

这个是在虚拟机中测试安装的。最终是要为集群安装,不可以重做系统。

Csdn user default icon
上传中...
上传图片
插入图片