标签:localhost password identified mysql 更改密码
让root用户可以通用 Navicat for MySQL客户端登录:
mysql> grant all privileges on *.* to root@‘%‘ identified by ‘root‘;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
对user1用户更改密码,权限有点大,但不执行下面的第一条命令,密码改不了。
mysql> grant all privileges on *.* to user1@‘localhost‘ identified by ‘123456‘;
Query OK, 0 rows affected (0.00 sec)
mysql> set password for user1@localhost=password(‘123456‘);
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
标签:localhost password identified mysql 更改密码
原文地址:http://devin223.blog.51cto.com/10447310/1690071