其一:mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');其二:mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES; 可以解决这个问题
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');其二:mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES; 可以解决这个问题
解决方案 »
- 关于fpdf页边距的问题
- 頻繁使用數組跟file_get_contents是否會有CPU與內存有巨大影響
- Header may not contain more than a single header
- 求助,我的Apache安装php-5.2.11-win32-installer.msi后不能启动。
- 请教一个PHP+MYSQL留言本的问题。(能插入英文,但是不能插入中文)
- 在线等待!关于怎样读取记录的问题
- 关于换行符号的问题
- 请教如何对文件进行压缩备份?
- 朋友让写一个上传文件的页面(用php实现),可是我不懂,那位好心的朋友帮帮忙啊
- 我如何在页面上显示该月的日历?谢谢!
- PHP5.0 连接 MYSQL5.0的时候出错:
- 关于列出的数据按系统时间排序的问题
C:\Program Files\MySQL\MySQL Server 4.1\bin>mysql -p -u root
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.14-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> set pasword for ->'some_user'@'some_host'=old_password('newpwd')
-> flush privileges
-> :
-> ;
ERROR 1193 (HY000): Unknown system variable 'pasword'
mysql> set pasword for ->'some_user'@'some_host'=old_password('newpwd');
ERROR 1193 (HY000): Unknown system variable 'pasword'
mysql> set password for ->'some_user'@'some_host'=old_password('newpwd');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '->'so
me_user'@'some_host'=old_password('newpwd')' at line 1
mysql> set password for ->'some_user'@'some_host'=old_password('newpwd')
-> set password for ->'some_user'@'some_host'=old_password('newpwd');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '->'so
me_user'@'some_host'=old_password('newpwd')
set password for ->'some_user'' at line 1
mysql> set password for -> 'root'@'localhost'=old_password('newpwd');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '-> 'r
oot'@'localhost'=old_password('newpwd')' at line 1
mysql>
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.09 sec)
但连接时出现以下错误:
错误: 不能连接MySQL服务器: "localhost" : '' MySQL系统报告:Client does not support authentication protocol requested by server; consider upgrading MySQL client
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'localhost' AND User = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)实际是这样的
错误: 不能连接MySQL服务器: "localhost" : '' MySQL系统报告:Access denied for user 'root'@'localhost' (using password: YES)