By default, remote access to Plesk databases is allowed from any computer as long as you specify its IP address. Also, you can disable remote access if the application is running on the Plesk server.
Access controls are specific to individual Plesk database users.For this settings to work, the application must use these database users to access the database.
In this article, we are going to show you how to set up database access rules for database users in Plesk.
- Plesk account
- Plesk firewall is turned on by hosting provider.
How To Set up Database Custom Access Rules in Plesk
MySQL’s remote access is controlled by MySQL native security mechanism – access controlled lists (ACL). When you specify your settings, they are added to the MySQL access control lists. Therefore to specify settings;
Log in to your Plesk account, click Databases. Plesk will list all the databases in your account, so proceed to select the particular database.
After selecting your database, at the upper right of the new page, click User Management.
You should now be able to see a list of all the users who have access to your database account. Select a User.
A new page where you can edit the privileges the chosen user can or cannot have will open. You can ignore everything but the Access control options.
You can now use one of the following options to edit the access rules for the user;
- Allow local connections only – this option is best suited to allow access to Plesk from all IP addresses.
- Allow remote connections – use this option whenever you want to allow remote access from any server.
- Allow remote connections from – you select a hostname or IP addresses which will be given access to the database.
Finally, since Plesk uses a firewall, you can see the message below the access control options.
If the firewall doesn’t allow remote connections to the MySQL database, then custom access won’t work.
PostgreSQL’s custom access rules are governed by firewall rather than access control lists (ACL). Thus when you specify custom rules, they are added to the systems firewall rules. To specify the access settings;
Login to your Plesk account click Databases and select a database.
Then proceed to click User Management at the upper right corner.
Afterwards, choose a user, and you can now edit the remote access rules to the database, but instead of the three options like MySQL, you will only see two;
- Use the system firewall rules – this option will use the rules defined by your hosting provider.
- Allow remote connections from – just like MySQL, you have to specify IP addresses from which the user can access the database.
Microsoft SQL server
Just like the PostgreSQL, MSQL is also controlled by firewall rules. Your customised rules are added to the system only after your hosting provider has reviewed them. To specify, the rules just follow the PostgreSQL method.
In this article, we covered how to set up custom access rules in Plesk. We started with MySQL; we saw how we can use the user management to set rules for users. We then proceeded to look at PostgreSQL where we learnt that it is controlled by firewall rules. With this article,you can control who has access to your database remotely.