日期:2014-05-16  浏览次数:20812 次

关于Mysql数据库,新建用户对数据库操作的权限问题
我通过管理员账号登录数据库,如何新建用户使该用户的权限只能对mysql中某个数据库中的某个表进行修改操作呢?

------解决方案--------------------
SQL code
mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
    ->     WITH GRANT OPTION;
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
    ->     WITH GRANT OPTION;
mysql> CREATE USER 'admin'@'localhost';
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
mysql> CREATE USER 'dummy'@'localhost';