无法在mysql DB中添加全局登录到用户帐户 [英] Unable to add Global Login to User account in mysql DB
问题描述
喜! ,我正在构建这个工具,给管理员一些控制用户,目前在授予用户全局登录到mysql数据库时遇到问题,它在MySql中运行时工作正常但由于某些原因,当我尝试运行sql命令
来自c#it failes:/
sql命令
创建'user_pass'标识的用户'user_name'@'%'
请注意,此命令在mysql中有效但在我尝试在c#中运行时会失效,但如果我更改了"%"它可以运行到本地主机。
只有数据库的管理员(或具有类似权限的人)允许添加用户。
运行查询的程序可能缺少这些权限。通常,用于设置SQLConnection的连接字符串定义了使用权限。常见值是"Windows身份验证"和"Windows身份验证"。或以明确的
文本提供用户名和PAssword。
这是一个处理连接字符串的网页:
http://www.connectionstrings.com/
hi! , am building this tool that gives an admin a few controls over the users , currently am facing a problem when it comes to granting users Global Login to mysql db , it works fine when i run it in MySql but for some reason when i try to run the sql command from c# it failes :/
the sql command
Create user 'user_name'@'%' identified by 'user_pass'
please note that this command works in mysql but failes when i try to run it in c# , but if i change the "%" to localhost it works .
Only the administrator (or someone with similar rights) of a DB is allowed to add a user.
Likely the programm running the query lacks those rights. Usually the connection string used to set up the SQLConnection defines wich rights are used. Common values are either "Windows Authentication" or providing the Username and PAssword in clear text.
Here is a webpage dealing with connection strings:
http://www.connectionstrings.com/
这篇关于无法在mysql DB中添加全局登录到用户帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!