让root用户可以通用 Navicat for MySQL客户端登录:
mysql> grant all privileges on *.* to [email protected]‘%‘ 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 [email protected]‘localhost‘ identified by ‘123456‘;
Query OK, 0 rows affected (0.00 sec)
mysql> set password for [email protected]=password(‘123456‘);
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
时间: 2024-10-19 09:14:24