mysql服务器未启动

g6baxovj  于 2021-06-15  发布在  Mysql
关注(0)|答案(0)|浏览(240)

当我这样做时: mysql -u root -p 和类型 my password 这就是我得到的:
错误2002(hy000):无法通过套接字'/var/run/mysqld/mysqld.sock'(2)连接到本地mysql服务器
所以我打这个: systemctl restart mysql 我得到了以下错误:
mysql.service的作业失败,因为控制进程退出,错误代码为。有关详细信息,请参阅“systemctl status mysql.service”和“journalctl-xe”。
所以我做了 journalctl -xe 得到这个结果:

дек 14 22:57:29 kazak systemd[1]: mysql.service: Failed with result 'exit-code'.
дек 14 22:57:29 kazak systemd[1]: Failed to start MySQL Community Server.
Subject: Unit mysql.service has failed
Defined-By: systemd
Unit mysql.service has failed.
The result is RESULT.
дек 14 22:57:30 kazak systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
дек 14 22:57:30 kazak systemd[1]: mysql.service: Scheduled restart job, restart counter is at 14.
Subject: Automatic restarting of a unit has been scheduled
Defined-By: systemd

所以我做了这个: systemctl status mysql.service 结果是:

mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start) since Fri 2018-12-14 22:59:11 +06; 5s ago
  Process: 14585 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 4037 (code=exited, status=0/SUCCESS); Control PID: 14594 (mysqld)
    Tasks: 14 (limit: 4915)
   CGroup: /system.slice/mysql.service
           ├─14594 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
           └─14596 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid`

请问有人知道怎么修理吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题