重装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 成功

 

 

你可能感兴趣的:(service,password,through,Without,Started)