我正在向我的mysql服务器添加记录,发生了一些事情。我重新启动了我的覆盆子pi并意识到我无法启动mysql。
使用phpmyadmin时出错:
Connection for controluser as defined in your configuration failed.
状态mysql服务:
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Thu 2018-01-11 00:27:52 MSK; 45s ago
Process: 2186 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Jan 11 00:37:38 svs /etc/init.d/mysql[6188]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian...ted in
Jan 11 00:37:38 svs /etc/init.d/mysql[6188]: [61B blob data]
Jan 11 00:37:38 svs /etc/init.d/mysql[6188]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/...' (2)'
Jan 11 00:37:38 svs /etc/init.d/mysql[6188]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.so...xists!
Jan 11 00:37:38 svs /etc/init.d/mysql[6188]:
Jan 11 00:37:38 svs mysql[5450]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . ...failed!
Jan 11 00:37:38 svs systemd[1]: mysql.service: control process exited, code=exited status=1
Jan 11 00:37:38 svs systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Jan 11 00:37:38 svs systemd[1]: Unit mysql.service entered failed state.
Mysql -u -p返回
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
感谢您的帮助:))
编辑: 解决了重新安装mysql的问题。