在到logging的MySQL中,我得到了警告:
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/run/mysqld/mysqld.sock' (2)我在一个页面上看到,这是由于mysql-server没有安装:同时<#>重新安装它
~$ sudo apt-get install --reinstall mysql-server
[sudo] password for krd:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-5.7 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).mysql 状态表示:
~$ service mysql status
● mysql.service - MySQL Community Server
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)试着完全安装mysqll,但仍然是同样的问题。在安装任何其他软件时,我都会看到下面的mysql-server-5.7问题,但是系统在安装时失败了。
The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-5.7 but it is not going to be installed
xterm : Depends: libutempter0 (>= 1.1.5) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).发布于 2020-06-03 09:14:21
套接字错误通常指向未启动的服务,稍后得到的错误( inactive (dead) )也指向该方向。
最可能的原因是配置文件中的无效选项(如Reason: Invalid argument所示)。
尝试通过
mv /etc/my.cnf /etc/my.cnf.bak
然后重新启动服务。
systemctl restart mysql
如果这样做有效,那么在逐行注释之后,将配置文件移回并重新启动服务,直到找出导致中断的原因为止。
https://askubuntu.com/questions/1246391
复制相似问题