2015-06-27 31 views
0

我一直在阅读,因为我对这款mysql服务器感兴趣,因为我对这款服务器感兴趣,因此我认为5个小时。 enter image description here enter image description here如何授予所有使用mysql服务器的用户

即使在我自己的机器我无法登录。我知道这对你而言并不新鲜。你能在这里启发我吗?但是当我将它更改为本地主机时,我连接了。你可以看到我改变了主机名。我想在我的网络中的所有连接在MySQL中。我不确定我是否以正确的方式。 这是我在vs 2010的连接;

Dim conn As New MySqlConnection("server=xxx.xxx.xxx.xxx;userid=root;password=root;database=dbname") 

回答

1
CREATE USER 'user1'@'localhost' IDENTIFIED BY 'password'; 

GRANT ALL PRIVILEGES ON dbname . * TO 'user1'; 

Flush privileges; 

https://dba.stackexchange.com/questions/26912/mysql-hostname-wildcard

的WITH GRANT OPTION子句使用户能够给其他 用户,用户有任何特权在指定的权限 水平的能力

+0

是user1 = root我的我的statemat上面?或者我必须创建一个新用户? – Denver

+0

新用户我的朋友 – Drew

+0

它不会改变我的代码?像userid = root或user1? – Denver

1

更改您的GRANT命令,如下所示。有关更多信息,请参见Documentation

GRANT ALL PRIVILEGES ON *.* TO [email protected]'%' WITH GRANT OPTION; 
+0

谢谢你的快速回复我upvote你的帖子也在工作:) – Denver

相关问题