admin管理员组文章数量:1130349
起因:
我把一块板子的根文件系统打包成镜像,把这个镜像用到了另一块板子上,启动MySQL服务,就报这个错误Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
首次碰见,研究了半天,才研究明白。
首先:
解释一下:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2),说明 MySQL 服务未正常启动,或者其套接字文件(/var/run/mysqld/mysqld.sock)不存在。
网上有很多方法参考,但触发条件不同,请仔细对比。
所以,我还是建议大家,尽量去官网研究,毕竟官网的解释和操作就很全面,但也很生涩难懂,
解决的思路:
发生错误首先看日志打印:cat /var/log/mysql/error.log
Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0 thread_stack 0x30000 /usr/sbin/mysqld(my_print_stac
起因:
我把一块板子的根文件系统打包成镜像,把这个镜像用到了另一块板子上,启动MySQL服务,就报这个错误Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
首次碰见,研究了半天,才研究明白。
首先:
解释一下:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2),说明 MySQL 服务未正常启动,或者其套接字文件(/var/run/mysqld/mysqld.sock)不存在。
网上有很多方法参考,但触发条件不同,请仔细对比。
所以,我还是建议大家,尽量去官网研究,毕竟官网的解释和操作就很全面,但也很生涩难懂,
解决的思路:
发生错误首先看日志打印:cat /var/log/mysql/error.log
Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0 thread_stack 0x30000 /usr/sbin/mysqld(my_print_stac
本文标签: connectlocalMySQLerrorrun
版权声明:本文标题:ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘varrunmysqldmysqld.sock‘ 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1755026819a2755114.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论