<bdo id='zvOMD'></bdo><ul id='zvOMD'></ul>

  1. <tfoot id='zvOMD'></tfoot>
      <legend id='zvOMD'><style id='zvOMD'><dir id='zvOMD'><q id='zvOMD'></q></dir></style></legend>
    1. <i id='zvOMD'><tr id='zvOMD'><dt id='zvOMD'><q id='zvOMD'><span id='zvOMD'><b id='zvOMD'><form id='zvOMD'><ins id='zvOMD'></ins><ul id='zvOMD'></ul><sub id='zvOMD'></sub></form><legend id='zvOMD'></legend><bdo id='zvOMD'><pre id='zvOMD'><center id='zvOMD'></center></pre></bdo></b><th id='zvOMD'></th></span></q></dt></tr></i><div id='zvOMD'><tfoot id='zvOMD'></tfoot><dl id='zvOMD'><fieldset id='zvOMD'></fieldset></dl></div>
    2. <small id='zvOMD'></small><noframes id='zvOMD'>

      ERROR 2002 (HY000): 无法通过 socket '/var/run/mysqld/

      时间:2023-08-18
    3. <i id='e23iE'><tr id='e23iE'><dt id='e23iE'><q id='e23iE'><span id='e23iE'><b id='e23iE'><form id='e23iE'><ins id='e23iE'></ins><ul id='e23iE'></ul><sub id='e23iE'></sub></form><legend id='e23iE'></legend><bdo id='e23iE'><pre id='e23iE'><center id='e23iE'></center></pre></bdo></b><th id='e23iE'></th></span></q></dt></tr></i><div id='e23iE'><tfoot id='e23iE'></tfoot><dl id='e23iE'><fieldset id='e23iE'></fieldset></dl></div>
        <bdo id='e23iE'></bdo><ul id='e23iE'></ul>
          <legend id='e23iE'><style id='e23iE'><dir id='e23iE'><q id='e23iE'></q></dir></style></legend>
              <tbody id='e23iE'></tbody>
            1. <tfoot id='e23iE'></tfoot>

                <small id='e23iE'></small><noframes id='e23iE'>

                本文介绍了ERROR 2002 (HY000): 无法通过 socket '/var/run/mysqld/mysqld.sock' 连接到本地 MySQL 服务器 (2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我在 LAMPwiki/List_of_Ubuntu_releases#Ubuntu_12.04_LTS_.28Precise_Pangolin.29">Ubuntu 12.04 LTS (Precise Pangolin) 然后在 phpMyAdmin.我忘记了密码,现在无法登录.当我尝试通过终端更改密码时,我得到:

                I installed LAMP on Ubuntu 12.04 LTS (Precise Pangolin) and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to change password through terminal I get:

                ERROR 2002 (HY000): 无法通过套接字连接到本地 MySQL 服务器'/var/run/mysqld/mysqld.sock'(2)

                ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

                我该如何解决这个问题?我无法打开 LAMP、卸载或重新安装.

                How can I fix this? I am unable to open LAMP, uninstall it or reinstall it.

                推荐答案

                我曾经遇到过这个问题,通过安装mysql-server解决了,所以请确认你已经安装了mysql-server,而不是 mysql-client 或其他东西.

                I once had this problem and solved it by installing mysql-server, so make sure that you have installed the mysql-server, not the mysql-client or something else.

                那个错误意味着文件/var/run/mysqld/mysqld.sock不存在,如果你没有安装mysql-server,那么文件不会存在.所以在这种情况下,用

                That error means the file /var/run/mysqld/mysqld.sock doesn't exists, if you didn't install mysql-server, then the file would not exist. So in that case, install it with

                sudo apt-get install mysql-server
                

                但是如果mysql-server已经安装并且正在运行,那么你需要检查配置文件.

                But if the mysql-server is already installed and is running, then you need to check the config files.

                配置文件是:

                /etc/my.cnf
                /etc/mysql/my.cnf
                /var/lib/mysql/my.cnf
                

                /etc/my.cnf中,socket文件配置可能是/tmp/mysql.sock/etc/mysql/my.cnf 套接字文件配置可能是 /var/run/mysqld/mysqld.sock.所以,删除或重命名/etc/mysql/my.cnf,让mysql使用/etc/my.cnf,那么问题就可以解决了.

                In /etc/my.cnf, the socket file config may be /tmp/mysql.sock and in /etc/mysql/my.cnf the socket file config may be /var/run/mysqld/mysqld.sock. So, remove or rename /etc/mysql/my.cnf, let mysql use /etc/my.cnf, then the problem may solved.

                这篇关于ERROR 2002 (HY000): 无法通过 socket '/var/run/mysqld/mysqld.sock' 连接到本地 MySQL 服务器 (2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何使用 GROUP BY 在 MySQL 中连接字符串? 下一篇:Mysql 错误 1452 - 无法添加或更新子行:外键约束失

                相关文章

                最新文章

                1. <legend id='ai9mC'><style id='ai9mC'><dir id='ai9mC'><q id='ai9mC'></q></dir></style></legend>
                2. <tfoot id='ai9mC'></tfoot>
                  <i id='ai9mC'><tr id='ai9mC'><dt id='ai9mC'><q id='ai9mC'><span id='ai9mC'><b id='ai9mC'><form id='ai9mC'><ins id='ai9mC'></ins><ul id='ai9mC'></ul><sub id='ai9mC'></sub></form><legend id='ai9mC'></legend><bdo id='ai9mC'><pre id='ai9mC'><center id='ai9mC'></center></pre></bdo></b><th id='ai9mC'></th></span></q></dt></tr></i><div id='ai9mC'><tfoot id='ai9mC'></tfoot><dl id='ai9mC'><fieldset id='ai9mC'></fieldset></dl></div>

                    <small id='ai9mC'></small><noframes id='ai9mC'>

                      <bdo id='ai9mC'></bdo><ul id='ai9mC'></ul>