全部博文(2065)
分类: Mysql/postgreSQL
2009-09-11 13:12:28
被要求加个用户,但是因为基于php4连接的
要用OLD_PASSWORD来设置用户密码
方法:
1. 先创建数据库帐户
mysql> grant Select on *.* to kujaidentified 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 .user SET Password = OLD_PASSWORD('newpwd')