简体   繁体   English

如何授予所有使用mysql服务器的用户

[英]how to grant all user using mysql server

i been reading for i think 5 hours about this mysql server since i'm new to it. 我一直在阅读,因为我是新来的,所以我认为这个MySQL服务器需要5个小时。 在此处输入图片说明在此处输入图片说明

even in my own machine i can't login. 即使在我自己的机器上,我也无法登录。 i know this is not new to you. 我知道这对您来说并不新鲜。 can you please enlighten me here? 你能在这里启发我吗? but when i change it to localhost i connect. 但是当我将其更改为localhost时,我会连接。 as you can see i change the hostname. 如您所见,我更改了主机名。 i want that all in my network to connect in mysql. 我希望我网络中的所有人都可以在mysql中进行连接。 i am not sure if i'm in the right way. 我不确定我的方法是否正确。 here is my connection in the vs 2010; 这是我在vs 2010中的联系;

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

Change your GRANT command like below. 如下更改您的GRANT命令。 See Documentation for more information. 有关更多信息,请参见文档

GRANT ALL PRIVILEGES ON *.* TO  root@'%' WITH GRANT OPTION;
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 https://dba.stackexchange.com/questions/26912/mysql-hostname-wildcard

The WITH GRANT OPTION clause gives the user the ability to give to other users any privileges the user has at the specified privilege level WITH GRANT OPTION子句使用户能够将指定级别的特权授予其他用户

.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM