如何授予所有使用 mysql 服务器的用户
how to grant all user using mysql server
关于这个 mysql 服务器,我已经阅读了 5 个小时,因为我是新手。
即使在我自己的机器上我也无法登录。我知道这对你来说并不陌生。你能在这里启发我吗?但是当我将其更改为本地主机时,我会连接。如您所见,我更改了主机名。我希望我的网络中的所有内容都连接到 mysql。我不确定我的方法是否正确。
这是我在 vs 2010 中的连接;
Dim conn As New MySqlConnection("server=xxx.xxx.xxx.xxx;userid=root;password=root;database=dbname")
更改您的 GRANT
命令,如下所示。有关详细信息,请参阅 Documentation。
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
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
.
关于这个 mysql 服务器,我已经阅读了 5 个小时,因为我是新手。
即使在我自己的机器上我也无法登录。我知道这对你来说并不陌生。你能在这里启发我吗?但是当我将其更改为本地主机时,我会连接。如您所见,我更改了主机名。我希望我的网络中的所有内容都连接到 mysql。我不确定我的方法是否正确。 这是我在 vs 2010 中的连接;
Dim conn As New MySqlConnection("server=xxx.xxx.xxx.xxx;userid=root;password=root;database=dbname")
更改您的 GRANT
命令,如下所示。有关详细信息,请参阅 Documentation。
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
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
.