2个回答
2013-03-26
展开全部
修改当前登录用户的密码: (也就是修改自己的密码)
mysql> SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected (0.00 sec)
mysql> select host, user, password from mysql.user;
+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | |
| localhost | | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
+-----------+------+-------------------------------------------+
2 rows in set (0.00 sec)
要想更改已有账户的密码,使用UPDATE来设置Password列值:
shell> mysql -u root mysql
mysql> UPDATE user SET Password = PASSWORD('bagel')
-> WHERE Host = '%' AND User = 'francis';
mysql> FLUSH PRIVILEGES;
只在 mysql 命令行下面测试过, mysql-front 没用过。
mysql> SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected (0.00 sec)
mysql> select host, user, password from mysql.user;
+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | |
| localhost | | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
+-----------+------+-------------------------------------------+
2 rows in set (0.00 sec)
要想更改已有账户的密码,使用UPDATE来设置Password列值:
shell> mysql -u root mysql
mysql> UPDATE user SET Password = PASSWORD('bagel')
-> WHERE Host = '%' AND User = 'francis';
mysql> FLUSH PRIVILEGES;
只在 mysql 命令行下面测试过, mysql-front 没用过。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询