700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > linux安装后启动mysql linux安装完mysql后启动错误

linux安装后启动mysql linux安装完mysql后启动错误

时间:2019-04-07 04:10:15

相关推荐

linux安装后启动mysql linux安装完mysql后启动错误

redhat as 4,使用rpm包安装完mysql的server 跟client后执行以下命令出错。

[root@ftp etc]# /usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/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!

提示 以上错误时执行

/usr/local/mysql/bin/mysqld_safe & service mysql start 即可。

(如果你的mysql目录没有安装在/usr/local/mysql下,则执行/usr/bin/mysqld_safe & service mysql start即可)

使用netstat -na查看,发现mysql的3306端口已经启动了

[root@ftp local]# netstat -na

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 0.0.0.0:32771 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:627 0.0.0.0:* LISTEN

tcp 0 0 :::22 :::* LISTEN

tcp 0 232 ::ffff:222.194.76.37:22 ::ffff:123.233.213.223:1887 ESTABLISHED

udp 0 0 0.0.0.0:1024 0.0.0.0:*

udp 0 0 0.0.0.0:621 0.0.0.0:*

udp 0 0 0.0.0.0:111 0.0.0.0:*

udp 0 0 0.0.0.0:624 0.0.0.0:*

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。