• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Custom Wordpress install attempts to create the DB user credentials with the wrong hostname

burnley

Regular Pleskian
Hi,

I've been playing with using a remote MySQL instance for Plesk 12.5.30 and I've noticed something that's NQR. When trying to install Wordpress selecting the "Install custom" path, it appears that Plesk connects to the remote MySQL server and issues the following statements:

2016-09-28T14:49:33.529101+10:00335069 Query SELECT VERSION()
2016-09-28T14:49:33.531326+10:00335069 Query SELECT * FROM mysql.user WHERE User = 'testu_wordpres_3' LIMIT 1
2016-09-28T14:49:33.539494+10:00335069 Query SELECT VERSION()
2016-09-28T14:49:33.543639+10:00335069 Query CREATE USER 'testu_wordpres_3'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '<secret>'
2016-09-28T14:49:33.546839+10:00335069 Query GRANT Select, Insert, Update, Delete, Create, Drop, References, Alter, Index, Create Temporary Tables, Lock Tables, Create View, Show View, Create Routine, Alter Routine, Execute, Event, Trigger ON `testuser1local\_wordpress\_1`.* TO 'testu_wordpres_3'@'localhost'

The problem is with 'localhost'. Since the SQL client (the Plesk server) is remote, shouldn't Plesk use its own IP address when creating the user? Something like 'testu_wordpres_3'@'192.168.100.101', 'testu_wordpres_3'@'192.168.100.%' or similar? This approach adds a bit more complexity in the case when Plesk server is using multiple IP addresses, additional business logic might be required for the Panel.

I'd like to know what your thoughts are here, but obviously the remote MySQL server can't be used at least in this scenario.
 
Nevermind the noise :)
I think I've worked this one out: in the "Database Hosting Settings" I had "Default settings for remote access of database users" set to "Allow local connections only". After changing it to "Allow remote connections from any host" Plesk started to create the users with the host set to '%', which is what I needed.
Thanks.
 
Back
Top