• Ubuntu连接MySql报错“can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock'”


    在不重新安装mysql的情况下,通过如下命令来解决,具体的就是先停止mysql服务,再重新开启mysql服务

    cd /etc/init.d

    sudo service mysql stop

    sudo service mysql start 

    导致这个问题的原因是服务器存储空间不足了!!!

    后续还发现了一种情况,存储空间还有也报这个异常了,查看数据库日志:

    Initialzation of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.

    网上说是UUID生成有问题,打开/var/lib/mysql/auto.cnf 查看UUID时发现乱码,怀疑是文件损坏。把这个文件的文本内容全部清了,重启服务器即可解决!!!

  • 相关阅读:
    springcloud(三)
    springcloud(二)
    spring-cloud(一)
    springboot(三)
    springboot(二)
    springboot(一)
    dubbox
    SpringBoot终章(整合小型进销系统)
    SpringBoot第三节(thymeleaf的配置与SpringBoot注解大全)
    SpringBoot--集成Shiro
  • 原文地址:https://www.cnblogs.com/againn/p/7999265.html
Copyright © 2020-2023  润新知