Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
错误2002(HY000):Can';t通过套接字连接到本地MySQL服务器'/var/run/mysqld/mysqld.sock';(2) 在重新安装mySQL两次之后_Mysql_Database_Mysql Error 2002 - Fatal编程技术网

错误2002(HY000):Can';t通过套接字连接到本地MySQL服务器'/var/run/mysqld/mysqld.sock';(2) 在重新安装mySQL两次之后

错误2002(HY000):Can';t通过套接字连接到本地MySQL服务器'/var/run/mysqld/mysqld.sock';(2) 在重新安装mySQL两次之后,mysql,database,mysql-error-2002,Mysql,Database,Mysql Error 2002,我已经包括了一个图像,它显示了我所做的所有登录尝试,包括-h localhost和-h 127.0.0.1 我甚至检查了空间问题,没有任何问题 两天前我访问了数据库,今天它给了我这个错误 我已经看到清除和重新安装可以解决这个问题,并且在以前运行mySQL时已经这样做了,我不想每次都这样做 请调查我遇到的错误,并提出解决方法 如有要求或需要,我愿意提供更多额外数据 提前谢谢 这是我在var/log/mysql/error.log中找到的 2018-06-12T13:59:38.147016Z 0

我已经包括了一个图像,它显示了我所做的所有登录尝试,包括-h localhost和-h 127.0.0.1

我甚至检查了空间问题,没有任何问题

两天前我访问了数据库,今天它给了我这个错误

我已经看到清除和重新安装可以解决这个问题,并且在以前运行mySQL时已经这样做了,我不想每次都这样做

请调查我遇到的错误,并提出解决方法

如有要求或需要,我愿意提供更多额外数据

提前谢谢

这是我在var/log/mysql/error.log中找到的

2018-06-12T13:59:38.147016Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-06-12T13:59:38.507148Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-06-12T13:59:38.579416Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-06-12T13:59:38.647136Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: d8a93ee9-6e48-11e8-b5af-32306b28cd52.
2018-06-12T13:59:38.648977Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-06-12T13:59:38.650160Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

为什么不以文本形式共享错误消息?您查看过MySQL自己的日志文件吗?文件夹
/var/run/mysqld/
是否存在并且可由mysqld进程写入?当您尝试启动
mysqld
时会发生什么,在
/var/log/mysql*
中有什么,在
/var/log/syslog
中有什么?有一点是肯定的,如果你不修复错误本身,你可以重新安装10000次,这是没有用的。