我昨天也遇上这问题。害我重装了php和mysql
是不是要在mysql的user表里先修改了root的password,然后到phpmyadmin的
config.inc里设置啊?还是用dos命令行:update user set password=PASSWORD('344505') where
user=root
我都不敢试了,免得又要重装。
是不是要在mysql的user表里先修改了root的password,然后到phpmyadmin的
config.inc里设置啊?还是用dos命令行:update user set password=PASSWORD('344505') where
user=root
我都不敢试了,免得又要重装。
解决方案 »
- swfupload上传写入数据库有问
- 支持一下,踩一下,这个功能怎么做??
- 从m个数字中选取n个数作为一组。不计较顺序。 有多少种组合,分别是什么
- web 压力测试????
- php 写properties文件,有框架可以用吗?
- Linux和PHP兼容性问题,在线等,急!顶者有份!
- 如何使文本数据库实现分页显示,
- 关于php对gif动画的支持问题
- 求助!SESSION问题,在线等!老是出现这个问题!请问怎么办,大哥?
- 请介绍几本比较好的PHP入门书籍!
- 用"action=<?=$PHP_SELF?>"和用"action=当前的文件名"有什么不一样吗?
- 请问如何在PHP中嵌入一个HTML文件???
错误
MySQL 返回:
MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) 好像是帐号设置问题?要怎么解决呢?配置如下,我也没设密码呀
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfgServers[1]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[1]['stduser'] = ''; // MySQL standard user settings (this user must have read-only
$cfgServers[1]['stdpass'] = ''; // access to the "mysql/user" and "mysql/db" tables)
$cfgServers[1]['adv_auth'] = FALSE; // Use advanced authentication?
$cfgServers[1]['user'] = 'root'; // MySQL user
$cfgServers[1]['password'] = ''; // MySQL password (only needed with basic auth)
$cfgServers[1]['only_db'] = ''; // If set to a db-name, only this db is displayed at left frame
// It may also be an array of db-names
$cfgServers[1]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
$cfgServers[1]['bookdb'] = ''; // Book db - leave blank for no book support
$cfgServers[1]['booktable'] = ''; // Book table - leave blank for no book support 估计是mysql的问题
我运行phpinfo是可以的,说明php是好的;但运行连到mysql的程序时错误:
Warning: Access denied for user: 'root@localhost' (Using password: NO) in C:\apache\htdocs\prog\inc\db_mysql.php on line 98
Database error: pconnect(localhost, root, $Password) failed.
MySQL Error: ()
Session halted. 我是在98下用phptriad装的工作环境,请问如果要设mysql管理密码,应该先修改user表还是先修改phpmyadmin中config.inc.php?
$cfgServers[1]['password']就行了另外要注意mysql的user里用相应用且host字段为
$cfgServers[1]['host']的值或 "%"
mysql>SET PASSWORD FOR username@"%" = PASSWORD('password');或者mysql> GRANT USAGE ON *.* TO username@"%" IDENTIFIED BY 'password';加用户用mysql>GRANT ALL PRIVILEGES ON *.* TO user@"%"
IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
改密码 最好还是用phpmyadmin.它本身就可以完成呀.