Board logo

标题: [求助] 无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!: [打印本页]

作者: vnlife3    时间: 2013-1-19 14:04     标题: 无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:

本帖最后由 vnlife3 于 2013-1-19 14:10 编辑

各位大牛好

系统:WDLINUX OS 1.0 32bit
问题发生原因:

我点击了MYSQL管理中的MYSQL设置。将默认值更改为分类的“一般”
然后点击确定。


然后点击了重启mysql就提示“无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:

我百度了一下运行了tools下的sh脚本,并没有作用。
重启mysqld服务提示:Starting MySQL. ERROR! Manager of pid-file quit without updating file.

还望各位指教 谢谢。 我很喜欢wdlinux也很需要它。
作者: wulali    时间: 2013-1-19 14:18

把/www/wdlinux/etc/my.cnf文件里的设置还原一下,然后在SSH里执行service mysqld restart即可

以下是my.cnf文件的默认设置
  1. # mysql conf /etc/my.cnf
  2. # Created by http://www.wdlinux.cn
  3. # Last Updated 2010.06.01

  4. [client]
  5. port                = 3306
  6. socket                = /tmp/mysql.sock
  7. [mysqld]
  8. port                = 3306
  9. socket                = /tmp/mysql.sock
  10. skip-external-locking
  11. key_buffer_size = 128M
  12. max_allowed_packet = 1M
  13. table_open_cache = 256
  14. sort_buffer_size = 1M
  15. read_buffer_size = 1M
  16. read_rnd_buffer_size = 2M
  17. myisam_sort_buffer_size = 8M
  18. thread_cache_size = 8
  19. query_cache_size= 16M
  20. thread_concurrency = 8
  21. max_connections = 300
  22. wait_timeout = 30
  23. interactive_timeout = 30
  24. max_connect_errors = 9
  25. long_query_time = 1
  26. tmp_table_size = 16M
  27. #log-bin=mysql-bin
  28. #binlog_format=mixed
  29. #server-id        = 1
  30. [mysqldump]
  31. quick
  32. max_allowed_packet = 8M
  33. [mysql]
  34. no-auto-rehash
  35. [myisamchk]
  36. key_buffer_size = 12M
  37. sort_buffer_size = 1M
  38. read_buffer = 1M
  39. write_buffer = 1M
  40. [mysqlhotcopy]
  41. interactive-timeout
复制代码

作者: vnlife3    时间: 2013-1-19 14:22

回复 2# wulali


   error: Found option without preceding group in config file: /etc/my.cnf at line: 1Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
ERROR! MySQL manager or server PID file could not be found!
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
Starting MySQL. SUCCESS!
[root@fs1 etc]# service mysqld restart
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
Shutting down MySQL. SUCCESS!
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
Starting MySQL. SUCCESS!
作者: vnlife3    时间: 2013-1-19 14:23

修复完成了! 谢谢 wulali 的帮助!
作者: speedking    时间: 2013-1-19 20:53

也碰到这个问题  按照帖子的方法弄好了
作者: hhxxttxs    时间: 2013-1-20 19:22

乌班图 安装一键 访问 8080 之后出现   无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:
按照帖子 还原 重启,还是显示 无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:
作者: chen7413    时间: 2013-3-6 09:20

后台都进不去怎么弄!!!!!!
作者: qq514408389    时间: 2013-3-27 10:12

用工具sh /www/wdlinux/tools/mysql_wdcp_chg.sh
作者: omaman    时间: 2013-6-16 09:35

这个问题我也遇到了,看了所有的帮助都没有解决问题。后来我发现是root密码当初修改的时候我使用了".",重启mysql正常,但是就是出现请检查密码的错误。只要修改root密码为数字字母就行了。
作者: 板栗籽鸡    时间: 2013-7-29 14:33

怎么解决,第一次接触linux,我也出现了这样的问题。。。
作者: zhqs425    时间: 2013-8-6 16:11

用工具sh /www/wdlinux/tools/mysql_wdcp_chg.sh
作者: nano    时间: 2013-12-6 11:17

本帖最后由 nano 于 2013-12-6 11:22 编辑

centos 6.5 最小化安装
用 sh /www/wdlinux/tools/mysql_wdcp_chg.sh 后出现
Running..., Please Wait...
err
求解
作者: nano    时间: 2013-12-6 12:40

#sh /www/wdlinux/tools/mysql_root_chg.sh

Running..., Please Wait...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Change root password is OK
Current root password is:66JswiWp


是不是数据库密码问题?执行这个shell还是不行。
作者: nano    时间: 2013-12-6 12:41

# /etc/rc.d/init.d/mysqld status
ERROR! MySQL is not running, but lock exists
作者: nano    时间: 2013-12-6 12:59

重装系统试试看行不行,可能是我以前安装过mariadb没卸载干净的原因。
作者: nano    时间: 2013-12-6 13:51

经测试,重新安装系统后,正常。原来是系统原因。




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