Board logo

标题: [求助] mysql升级5.5后数据库无法连接phpMyAdmin错误2002 [打印本页]

作者: crossdasky    时间: 2017-2-20 10:00     标题: mysql升级5.5后数据库无法连接phpMyAdmin错误2002

登录phpMyAdmin报错:
phpMyAdmin - Error
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)


wordpress报错:
Error establishing a database connection


按照论坛教程(http://www.wdlinux.cn/bbs/viewthread.php?tid=5461 )操作的,并且尝试了老大在http://www.wdlinux.cn/bbs/viewth ... ghlight=mysql%2B5.5 说的修改localhost为127.0.01还是同样的错误。

请问这个是什么情况?谢谢
还有我的 /www/wdlinux/init.d/mysqld 文件是不是有多余的东西,在ssh尝试用vi修改的时候总是保存不了。http://pan.baidu.com/share/link?shareid=141086264&uk=1671249803
超字数发布了,为了能预览把后缀改成txt了。
作者: 向上的葱子    时间: 2017-2-20 10:57

看下是否启用了MySQL的root账户,再看下密码是否正确
作者: crossdasky    时间: 2017-2-22 08:49

回复 2# 向上的葱子

看了下好像mysql运行有问题这个怎么解决?谢谢
  1. [root@iZm5eaj9b52jsu50vyaxhmZ ~]# service mysqld start
  2. env: /etc/init.d/mysqld: No such file or directory
  3. [root@iZm5eaj9b52jsu50vyaxhmZ ~]# service mysqld startservice mysqld start
  4. env: /etc/init.d/mysqld: No such file or directory
  5. [root@iZm5eaj9b52jsu50vyaxhmZ ~]#
  6. [root@iZm5eaj9b52jsu50vyaxhmZ ~]# service mysqld starts
  7. env: /etc/init.d/mysqld: No such file or directory
  8. [root@iZm5eaj9b52jsu50vyaxhmZ ~]# find mysqld
  9. find: `mysqld': No such file or directory
  10. [root@iZm5eaj9b52jsu50vyaxhmZ ~]# cd /etc/init.d
  11. [root@iZm5eaj9b52jsu50vyaxhmZ init.d]# find mysqld
  12. mysqld
  13. [root@iZm5eaj9b52jsu50vyaxhmZ init.d]# service mysqld start
  14. env: /etc/init.d/mysqld: No such file or directory
  15. [root@iZm5eaj9b52jsu50vyaxhmZ init.d]# mysqladmin restart
  16. mysqladmin: connect to server at 'localhost' failed
  17. error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
  18. Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
  19. [root@iZm5eaj9b52jsu50vyaxhmZ init.d]# /ect/init.d/mysql restart
  20. -bash: /ect/init.d/mysql: No such file or directory
  21. [root@iZm5eaj9b52jsu50vyaxhmZ init.d]# cd
  22. [root@iZm5eaj9b52jsu50vyaxhmZ ~]#
  23. [root@iZm5eaj9b52jsu50vyaxhmZ ~]# mysqladmin restart
  24. mysqladmin: connect to server at 'localhost' failed
  25. error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
  26. Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
  27. [root@iZm5eaj9b52jsu50vyaxhmZ ~]#
复制代码

作者: crossdasky    时间: 2017-2-22 16:52

本想着如果用另一台vps重复步骤看看哪里出错了,但现在v3安装直接是高版本了?
作者: 向上的葱子    时间: 2017-2-22 17:12

mysql配置文件里面指定user为root
作者: crossdasky    时间: 2017-2-26 14:11

回复 5# 向上的葱子

请问这个要如何设置? 谢谢
作者: 嗨嗨    时间: 2017-3-4 08:57

我的也是这个问题怎么解决?




欢迎光临 WDlinux官方论坛 (http://www.wdlinux.cn/bbs/) Powered by Discuz! 7.2