mysql 5.6 服务启动_重装mysql 5.6 后,无法启动服务

重装mysql 5.6 后,无法启动服务

报错r如下:

[root@localhost xtrabackup]# mysql  -u root  -p

Enter password:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@localhost xtrabackup]# service mysql start

Starting MySQL....... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

[root@localhost xtrabackup]# cd  /var/lib/mysql

查看服务器错误日志 后,发现问题

en started. Generating a new UUID: 85fb7faa-f85c-11e3-9662-000c29f9cf46.

2014-06-20 02:23:21 6248 [Note] Server hostname (bind-address): '*'; port: 3306

2014-06-20 02:23:22 6248 [Note] IPv6 is available.

2014-06-20 02:23:22 6248 [Note]   - '::' resolves to '::';

2014-06-20 02:23:22 6248 [Note] Server socket created on IP: '::'.

2014-06-20 02:23:22 6248 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use

2014-06-20 02:23:22 6248 [ERROR] Do you already have another mysqld server running on port: 3306 ?

2014-06-20 02:23:22 6248 [ERROR] Aborting

IP 地址和prot已被占用

确认mysql服务是关闭的

[root@localhost mysql]# service mysql status

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

ERROR! MySQL is not running

到底是什么占用了IP和端口

[root@localhost mysql]# ps aux | grep mysql

root      2094  0.0  0.0 108328   904 ?        S    Jun19   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid

mysql     2199  0.1 27.9 1145812 283060 ?      Sl   Jun19   0:12 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/localhost.localdomain.err --pid-file=/var/lib/mysql/localhost.localdomain.pid

root      6623  4.0  0.0 103244   840 pts/1    S+   02:27   0:00 grep mysql

查看下 包含mysql字符的进程 ,然后kill掉  [root@localhost mysql]# kill 2094[root@localhost mysql]# kill 2199  再启动[root@localhost mysql]# service mysql start Starting MySQL......... SUCCESS!  ok 成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值