首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >mysql安装问题-Ubuntu18.04仿生

问mysql安装问题-Ubuntu18.04仿生
EN

Ask Ubuntu用户
提问于 2020-06-03 07:36:43
回答 1查看 206关注 0票数 0

在到logging的MySQL中,我得到了警告:

代码语言:javascript
复制
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没有安装:同时<#>重新安装它

代码语言:javascript
复制
~$ 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 状态表示:

代码语言:javascript
复制
~$ service mysql status
● mysql.service - MySQL Community Server
   Loaded: error (Reason: Invalid argument)
   Active: inactive (dead)

试着完全安装mysqll,但仍然是同样的问题。在安装任何其他软件时,我都会看到下面的mysql-server-5.7问题,但是系统在安装时失败了。

代码语言:javascript
复制
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).
EN

回答 1

Ask Ubuntu用户

发布于 2020-06-03 09:14:21

套接字错误通常指向未启动的服务,稍后得到的错误( inactive (dead) )也指向该方向。

最可能的原因是配置文件中的无效选项(如Reason: Invalid argument所示)。

尝试通过

mv /etc/my.cnf /etc/my.cnf.bak

然后重新启动服务。

systemctl restart mysql

如果这样做有效,那么在逐行注释之后,将配置文件移回并重新启动服务,直到找出导致中断的原因为止。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1246391

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档