Edit Databases -> Remote Hosts (cli option?)


I’ve been trying to find this one, but I’m not able to. Is there such an option or a way that this can be achieved via CLI?

In short if anyone knows a way to add IP grants to certain database with Virtualmin CLI it would be really helpful. :slight_smile:

IF someone also can confirm if this might be a working proper way and wouldn’t mess anything regarding Virtualmin server, I can use something like this as well.

mysql -u username -ppassword -Bse "GRANT ALL ON username.* TO 'username'@'' IDENTIFIED BY 'password';FLUSH PRIVILEGES;"

Granting user username to access from to database username.

OR if there is a way to add even IP to access all databases with proper user/password would be ideal. If one edit helps here, even GUI method would work, but CLI is preferred if possible in any way.

If anyone can help a bit with this it would be really appreciated.

Thank you!

Virtualmin gets its information about the database from the database (in general…though it has a bit of metadata that is not available via the database, like authentication info, etc.). And, Virtualmin does not depend on the database for its own operation.

So, you can make changes like this in the database and Virtualmin generally won’t care.

One caveat is that if you change the password of a domain owner user in the database outside of Virtualmin, Virtualmin will no longer be able to setup apps and such that use the database for that domain. So, don’t do that, but otherwise it’s fine.

As for GUI, you can fully manage users and permissions in the MySQL module in Webmin. But, there is no CLI for that (but, you already have a CLI for database management, mysql…).

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.