千家信息网

linux下mysql启动出现Can't connect to local MySQL server through socket怎么办

发表于:2025-02-04 作者:千家信息网编辑
千家信息网最后更新 2025年02月04日,本篇内容介绍了"linux下mysql启动出现Can't connect to local MySQL server through socket怎么办"的有关知识,在实际案例的操作过程中,不少人都会
千家信息网最后更新 2025年02月04日linux下mysql启动出现Can't connect to local MySQL server through socket怎么办

本篇内容介绍了"linux下mysql启动出现Can't connect to local MySQL server through socket怎么办"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

linux下启动出现Can't connect to local MySQL server through socket的问题

问题: linux下mysql启动问题! Can't connect to local MySQL server through socket

解决方案:(我的解决方案成功了!其它情况就参照一下吧!嘿嘿。。。)

Ruby代码
首先:cp /usr/share/doc/MySQL-server-5.5.24/my-medium.cnf /etc/my.cnf www.2cto.com
其次:touch /var/lib/mysql/mysql.scok
第三:/etc/rc.d/init.d/mysql status //查看mysql服务是否启动
第四:service mysql start//如果mysql服务没有启动,便启动mysql服务
第五:service mysqld start


"linux下mysql启动出现Can't connect to local MySQL server through socket怎么办"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!

0