linux安装完mysql后启动错误
2009-02-21 00:00
561 查看
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:*
[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:*
相关文章推荐
- linux新系统yum安装mysql启动报unrecognized错误解决方法
- mysql安装步骤及遇到的MySQL 服务无法启动。 服务没有报告任何错误。 请键入 NET HELPMSG 3534 以获得更多的帮助。
- Linux上安装Mysql时出现错误 , 包冲突 - 解决
- Linux下安装、启动MySQL
- 免安装版--- mysql 启动报错--发现系统错误2,系统找不到指定的文件。解决办法
- Linux下安装、启动MySQL
- 安装MySQL无法启动服务的1067错误
- linux下删除默认mysql和安装mysql5.6以及1130错误
- MySQL安装或重装后出现无法启动MySQL服务错误:发生系统错误2 系统找不到指定的文件
- vbox安装,启动错误:Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
- linux安装、启动mysql
- MySql 5.7.10 安装及服务无法启动,服务没有报告任何错误
- linux下安装mysql后storm启动报错
- linux下安装mysql并配置开机启动等
- linux下安装MySQL安装 、启动失败 问题解决办法
- mac安装mysql后,启动mysql ERROR 2002 (HY000)错误解决办法
- 解决Linux下MySQL启动错误Starting MySQL.Manager of pid-file quit without updating file
- Linux下安装mysql后无法启动的解决方法
- Linux下安装、启动MySQL
- windows 上安装2个mysql 无法启动错误处理