linux下mysql启动不了

启动错误  service mysql start
Redirecting to /bin/systemctl start  mysql.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

启动mysql数据库   /etc/init.d/mysqld start
Starting MySQL./usr/local/mysql/bin/mysqld_safe: line 586: /var/lib/mysql/mysqld_safe.pid: No such file or directory
awk: (FILENAME=- FNR=1) warning: error writing standard output (Broken pipe)
2017-09-18T15:34:56.932709Z mysqld_safe error: log-error set to '/var/log/mariadb/mariadb.log', however file don't exists. Create writable for user 'mysql'.
The server quit without updating PID file (/var/lib/mysql/i[FAILED]wd8737sb59wtxz.pid).



关闭错误  service mysql stop
Redirecting to /bin/systemctl stop  mysql.service
(用/bin/systemctl stop  mysql.service启动 不是service mysql stop)



重启错误   service mysql restart
Redirecting to /bin/systemctl restart  mysql.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.



登陆错误   mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)



systemctl status mysqld.servicejournalctl -xe查看服务启动失败的原因


查看mysql的pid   service mysqld status
MySQL is not running, but lock file (/var/lock/subsys/mysql[FAILED]

ps -ef | grep mysql        查看mysql的运行状态
root     17653 16990  0 11:48 pts/0    00:00:00 grep --color=auto mysql

posted @ 2017-10-23 11:54  za_szybko  阅读(16383)  评论(6编辑  收藏  举报