[英]Mysql grant all privileges to a user on everywhere
In my windows forms application I use Mysql to get data.在我的 Windows 窗体应用程序中,我使用 Mysql 来获取数据。 (I use MySql.Data.dll)
(我使用 MySql.Data.dll)
Here is my connection string:这是我的连接字符串:
server=xxx.xxx.xxx.xxx;user id=user_name;Password=userpass;database=products
When I want use my application on a computer, I must add computer's ip to remote mysql connection on cpanel.当我想在计算机上使用我的应用程序时,我必须将计算机的 ip 添加到 cpanel 上的远程 mysql 连接。 I want grant all privileges (on every IP) to user which I use on my connection string.
我想将所有权限(在每个 IP 上)授予我在连接字符串上使用的用户。
How can I do it?我该怎么做?
Try giving the user a "Super User" privileges; 尝试为用户提供“超级用户”权限;
GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'%' WITH GRANT OPTION;
to add password into the query; 在查询中添加密码;
GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'%' identified by 'userpass';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'Hello@123' WITH GRANT OPTION;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.