删除MySQL中特定数据库中用户的所有权限

时间:2022-07-07 01:50:20

I have installed MySQL on my local server. I want to create a user with all privilege to all database except one. In this case he also can create a new database and can access it with full functionality.

我在本地服务器上安装了MySQL。我想创建一个具有所有数据库的所有权限的用户,除了一个。在这种情况下,他还可以创建一个新的数据库,并可以使用完整的功能访问它。

In another word, how can we remove permission from an specific database. I tried several way, but I was unsuccessful.

换句话说,我们如何从特定数据库中删除权限。我尝试了几种方式,但我没有成功。

I got several situation while giving/revoking permission:

在给予/撤销许可时我有几种情况:

1: Revoked select, create, etc from user. It causes to not create a new database or table, etc.

1:撤消用户的选择,创建等。它导致不创建新的数据库或表等。

2: Given database specific permission to all database except one, and given global permission for create. It causes restriction to perform any task on newly created database by him.

2:给予除一个数据库以外的所有数据库的数据库特定权限,并给予create的全局权限。它导致限制在他新创建的数据库上执行任何任务。

References I used: http://www.lowendtalk.com/discussion/34667/how-to-grant-a-user-to-create-database-phpmyadmin

我使用的参考资料:http://www.lowendtalk.com/discussion/34667/how-to-grant-a-user-to-create-database-phpmyadmin

1 个解决方案

#1


0  

ok now i got you..

好的,我现在有你..

  • are you aware of the database-specific privileges?
  • 你知道特定于数据库的权限吗?
  • click on your existing database and look for a field "Privileges"
  • 单击现有数据库并查找“权限”字段
  • now here you can set privilages for listed users.
  • 现在,您可以为列出的用户设置权限。

check out this screenshot

看看这个截图

#1


0  

ok now i got you..

好的,我现在有你..

  • are you aware of the database-specific privileges?
  • 你知道特定于数据库的权限吗?
  • click on your existing database and look for a field "Privileges"
  • 单击现有数据库并查找“权限”字段
  • now here you can set privilages for listed users.
  • 现在,您可以为列出的用户设置权限。

check out this screenshot

看看这个截图