• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question How to use Plesk CLI to change 'Default settings for remote access of database users'?

Visnet

Basic Pleskian
We would like to change the option "Default settings for remote access of database users" ('Tools & Settings' > 'Database Hosting Preferences') to "Allow local connections only", using Plesk CLI.

The following commands do not seem to be the solution:
Code:
plesk bin server_pref -allow-siteapp-local-db false
or
Code:
# plesk bin server_pref -allow-siteapp-local-db false
Unknown command: -allow-siteapp-local-db

exit status 1

How can this be done using the Plesk CLI?

Using Plesk 12.5.30 MU #71
 
Looks like there is bug in Documentation server_pref: Interface and System Preferences regarding -allow-siteapp-local-db option. I have submitted it as PDP-70. Thanks.

You can this option to "Allow local connections only" in CLI with following command:

Code:
# plesk db "update misc set val='localhost' where param='default_database_acl_hosts'"
 
The query you posted doesn't have any effect that gets reflected in the web interface.

Also the 'default_database_acl_hosts' param doesn't seem to be present in the database, also not after executing the query you posted.
Code:
MariaDB [psa]> select * from misc where param='default_database_acl_hosts';
Empty set (0.00 sec)

Please advise..
 
This option doesn't exists by default in misc table of Plesk 12.5 database. Try to switch this option in Plesk UI and this option will appear in misc. Or create it with SQL command.
 
So the final query/command is:
Bash:
plesk db "INSERT INTO misc VALUES ('default_database_acl_hosts', 'localhost') ON DUPLICATE KEY UPDATE val='localhost'"
 
Back
Top