被要求加个用户,但是因为基于php4连接数据库的
要用OLD_PASSWORD来设置用户密码
方法:
1. 先创建数据库帐户
mysql> grant Select on *.* to kuja identified by 'kuja';
Query OK, 0 rows affected (0.00 sec)
2. 将密码置为OLD_PASSWORD
mysql> set password for = old_password('oigwpofmn');
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
或者
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';