WDlinux官方论坛's Archiver

vnlife3 发表于 2013-1-19 14:04

无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:

[i=s] 本帖最后由 vnlife3 于 2013-1-19 14:10 编辑 [/i]

[font=Simsun][size=3][color=#000000]各位大牛好[/color][/size][/font][font=Simsun][size=3][color=#000000]
[/color][/size][/font]
系统:WDLINUX OS 1.0 32bit
[font=Simsun][size=3][color=#000000]问题发生原因:[/color][/size][/font][font=Simsun][size=3][color=#000000]
[/color][/size][/font]
[font=Simsun][size=3][color=#000000]我点击了MYSQL管理中的MYSQL设置。将默认值更改为分类的“一般”[/color][/size][/font]
[font=Simsun][size=3][color=#000000]然后点击确定。[/color][/size][/font]
[font=Simsun][size=3][color=#000000]
[/color][/size][/font]
[font=Simsun][size=3][color=#000000]然后点击了重启mysql就提示“[/color][/size][/font][color=#000][font=Simsun]无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:[/font][/color][color=#000][font=Simsun]”[/font][/color]

[font=Simsun][size=3][color=#000000]我百度了一下运行了tools下的sh脚本,并没有作用。[/color][/size][/font]
[font=Simsun][size=3][color=#000000]重启mysqld服务提示:[/color][/size][/font]Starting MySQL. ERROR! Manager of pid-file quit without updating file.[font=Simsun][size=3][color=#000000]
[/color][/size][/font]
[font=Simsun][size=3][color=#000000]还望各位指教 谢谢。 我很喜欢wdlinux也很需要它。[/color][/size][/font]

wulali 发表于 2013-1-19 14:18

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

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

[client]
port                = 3306
socket                = /tmp/mysql.sock
[mysqld]
port                = 3306
socket                = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 128M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 8M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
max_connections = 300
wait_timeout = 30
interactive_timeout = 30
max_connect_errors = 9
long_query_time = 1
tmp_table_size = 16M
#log-bin=mysql-bin
#binlog_format=mixed
#server-id        = 1
[mysqldump]
quick
max_allowed_packet = 8M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 12M
sort_buffer_size = 1M
read_buffer = 1M
write_buffer = 1M
[mysqlhotcopy]
interactive-timeout[/code]

vnlife3 发表于 2013-1-19 14:22

[b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=18362&ptid=4887]2#[/url] [i]wulali[/i] [/b]


   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

[i=s] 本帖最后由 nano 于 2013-12-6 11:22 编辑 [/i]

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

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

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.