[[email protected] ~]# vi /var/log/mysqld.log
进入log日志发现报以下的错误:
170901 4:56:54 InnoDB: Initializing buffer pool, size = 8.0M
170901 4:56:54 InnoDB: Completed initialization of buffer pool
170901 4:56:55 InnoDB: Started; log sequence number 0 44233
170901 4:56:55 [ERROR] Can‘t start server: Bind on TCP/IP port: Address already in use
170901 4:56:55 [ERROR] Do you already have another mysqld server running on port: 3306 ?
170901 4:56:55 [ERROR] Aborting
这个问题是因为3306端口被占用:
[[email protected] ~]# netstat -tunlp|grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1672/mysqld
[[email protected] ~]# kill -9 1672
[[email protected] ~]# service mysqld start
正在启动 mysqld: [确定]
[[email protected] ~]# mysqladmin -uroot password 123456
[[email protected] ~]# mysql -uroot -p123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql>
解决啦!!!!!
mysqld启动“ Can't start server: Bind on TCP/IP port: Address already in use