具有多个 ACL 权限的相同主机和用户名 mySQL [英] Same Host and Username with Multiple ACL Privileges mySQL
问题描述
在mySql中,据我所知,我们可以为来自不同主机的相同用户名授予权限.例如.可以为用户 'karthick' @ localhost 分配与用户 'karthick' @ madhost.com 不同的权限
In mySql, as far as my understanding goes, its possible for us to grant privileges for same user name from different hosts. eg. user 'karthick' @ localhost could be assigned privileges different from user 'karthick' @ madhost.com
但是,是否可以连接到具有相同用户名和来自同一主机但具有不同权限的数据库?例如.像 fopen("file.txt","r") &fopen("file.txt","w");我们可以使用相同的用户名但不同的权限从同一台主机连接到数据库吗?
But, will it be possible to connect to a database with same user name and from same host but with different privileges? For eg. like fopen("file.txt","r") & fopen("file.txt","w"); will we be able to connect to database from the same host with the same username but different privileges?
推荐答案
据我所知,您可以为同一用户分配不同的权限,但不能分配给服务器上的同一个数据库.如果可以,服务器将不知道要使用哪一组权限.如果它在不同的服务器上,它将只是一个具有相同用户名和密码的新用户.它们不会以任何其他方式链接.
To my knowledge, you can assign different privileges for the same user, but not on to the same database on the server. If you could, the server would not know which set of permissions to use. If it is on a different server, it will just be a new user which has the same username and password. They won't be linked in any other way.
这篇关于具有多个 ACL 权限的相同主机和用户名 mySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!