zoukankan      html  css  js  c++  java
  • 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时发现乱码,怀疑是文件损坏。把这个文件的文本内容全部清了,重启服务器即可解决!!!

  • 相关阅读:
    IO复习
    递归
    转换流
    编码与解码
    打印流(printStream)
    Properties
    【转】将Visual Studio武装到底
    【转】VS2008中的自定义格式化代码
    C++开发工具的常用插件
    抽烟的注意事项
  • 原文地址:https://www.cnblogs.com/againn/p/7999265.html
Copyright © 2011-2022 走看看