Mysql 对某个用户赋值数据库所有权限

[mysql@frapp ~]$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8843
Server version: 5.7.18 MySQL Community Server (GPL)
mysql> grant all privileges on db.* to user@'%' identified by 'password' ;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> grant all privileges on db.* to user@'localhost' identified by 'password';   
Query OK, 0 rows affected, 1 warning (0.00 sec)

你可能感兴趣的:(Mysql)