Board logo

标题: [已解决] Wdcp 数据库连接服务,求助 [打印本页]

作者: lixi.china    时间: 2012-7-3 16:29     标题: Wdcp 数据库连接服务,求助

本帖最后由 lixi.china 于 2012-7-5 13:20 编辑

求助朋友。

网站数据库连接不上了,wdcp也启动不了,请看截图。我该怎么做?找了一天了都没找到解决的方案。

在网上找到了这样的方法,但是还是没有解决问题;

ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)

# sudo /etc/init.d/mysql stop
# sudo mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p

但是网站还是显示这样。不知道怎么解决。谢谢。

使用的版本是WDCP 2.3

图片附件: [截图] 未命名.jpg (2012-7-3 16:28, 60.99 KB) / 下载次数 4129
http://wdlinux.cn/bbs/attachment.php?aid=883&k=2196d2de32c88c553600499cdbee3b8b&t=1720160413&sid=1gmjo7


作者: lixi.china    时间: 2012-7-3 16:40

本帖最后由 lixi.china 于 2012-7-3 17:02 编辑

请老大给个指点,谢谢了

图片附件: 未命名.jpg (2012-7-3 17:02, 65.63 KB) / 下载次数 4087
http://wdlinux.cn/bbs/attachment.php?aid=884&k=0ab5cd4d0ec11f12319f858d6b2dcf13&t=1720160413&sid=1gmjo7


作者: liangwei    时间: 2012-7-3 17:34

很明显的错误啊  你修改端口了
作者: admin    时间: 2012-7-3 18:01

端口已被使用

提问三步曲:
1 对应版块,提供系统版本位数,wdcp版本,lamp,lnmp,lnamp是哪个环境
2 有哪些错误信息或提示,贴上论坛或截图发论坛
3 做过哪些操作或更改或设置等详细说明
信息不详者,一律不解答,谢谢
作者: lixi.china    时间: 2012-7-4 09:19

回复老大,我应该没有更改端口,是不是误操作导致的啊?
我使用的是lnamp,wdcp 2.3 版本。
有没有这个问题的解决办法?

在线等,谢谢了。
作者: admin    时间: 2012-7-4 10:30

这种问题,没有应该,有就有,没有就没有

误操作,那你都做过哪些操作?看不到发贴三步曲吗
3 做过哪些操作或更改或设置等详细说明



从你上面的截图看,8080端口是给nginx用了,如果你没改过,是不可能的,除非是1.x
作者: lixi.china    时间: 2012-7-4 10:51

谢谢老大回复,给您发邮件了
作者: lixi.china    时间: 2012-7-4 12:07

我刚才问了,应该是有人改了我的php.ini,以下是配置文件,数据库还是显示:
Access denied for user 'root'@'localhost' (using password: NO)
网站还是连不上。

另外,nginx占用8080端口已经解决了,wdcp后台可以访问。现在版本是wdcp 2.4,lnamp环境。

看看php.ini 关于mysql的设置,是不是配置问题导致的?
mysql.max_links = -1

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =

; Maximum time (in seconds) for connect timeout. -1 means no limit
mysql.connect_timeout = 60

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off

[MySQLi]

; Maximum number of links.  -1 means no limit.
mysqli.max_links = -1

; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysqli.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysqli.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysqli.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysqli.default_user =

; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysqli.default_pw =

; Allow or prevent reconnect
mysqli.reconnect = Off
作者: admin    时间: 2012-7-4 13:22

跟php.ini没有关系的
你们仔细检查,及回想看下做过哪些更改和设置操作吧
作者: lixi.china    时间: 2012-7-5 13:20

回复,问题已经得到解决。
采用了比较原始的方法。

重装了系统!

问题得到解决




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