码迷,mamicode.com
首页 > 数据库 > 详细

关于无法开启mysqld的说明-网上找到教程的

时间:2018-05-07 11:54:29      阅读:3116      评论:0      收藏:0      [点我收藏+]

标签:mysql   linux   

开机之后,发现无法登陆mysql

[root@localhost ~]# mysql -hlocalhost -uroot -p123456
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 ‘/var/lib/mysql/mysql.sock‘ (111)

查看mysql状态,没有起来
[root@localhost ~]# systemctl status mysqld
● mysqld.service - SYSV: MySQL database server.
Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 一 2018-05-07 18:55:45 CST; 3min 10s ago
Docs: man:systemd-sysv-generator(8)
Process: 995 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE)

5月 07 18:55:37 localhost.localdomain systemd[1]: Starting SYSV: MySQL database server....
5月 07 18:55:45 localhost.localdomain mysqld[995]: MySQL Daemon failed to start.
5月 07 18:55:45 localhost.localdomain mysqld[995]: Starting mysqld: [失败]
5月 07 18:55:45 localhost.localdomain systemd[1]: mysqld.service: control process exited, code=exite...s=1
5月 07 18:55:45 localhost.localdomain systemd[1]: Failed to start SYSV: MySQL database server..
5月 07 18:55:45 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
5月 07 18:55:45 localhost.localdomain systemd[1]: mysqld.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

[root@localhost run]# mkdir -p /var/run/mysqld
[root@localhost run]# chown mysql.mysql mysqld
[root@localhost run]# systemctl start mysqld
开启成功!

关于无法开启mysqld的说明-网上找到教程的

标签:mysql   linux   

原文地址:http://blog.51cto.com/12131824/2113460

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!