• 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!
  • 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.

MySQL default host

P

Panther

Guest
Since Plesk 8.0, the default host name for MySQL users created by Plesk is the wildcard '%'. In Plesk 7.5 it was always "localhost". It appears that the wildcard works for everything but the localhost, so users are not able to access the databases they create without the admin going in and changing the host names to "localhost" in the mysql database user table.
 
I'm having the same problem. In fact. crating a new user and setting the host to % or localhost, I can't access the database at all.

I get this error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'myusername'@'localhost' (using password: YES) in /var/www/vhosts/mydomain.com/subdomains/dev/httpdocs/index.php on line 167
error connecting: Access denied for user 'myusername'@'localhost' (using password: YES)

I'm using 8.0.1
 
It seems I found a solution. In a nutshell, I followed an advice from Paul DuBois of MySQL Documentation Team: "Check the user table to see if there is an account with a Host value of 'localhost' and a User value of '' (empty string). If there is, remove it (DELETE FROM user WHERE Host='localhost' AND User='') and then do FLUSH PRIVILEGES." (look at http://archives.neohapsis.com/archives/mysql/2004-q1/3549.html if in doubt)

The issue I suffered from was described in MySQL 3.23, 4.0, 4.1 Reference Manual, 5.7.5. Access Control, Stage 1: Connection Verification ( http://dev.mysql.com/doc/refman/4.1/en/connection-access.html ).

Unfortunately, it was a default setup of MySQL in CentOS 4 (and RHEL 4 too, I guess) to put an account with a Host value of 'localhost' and a User value of '' (empty string) into mysql.user table. :(
 
It is indeed the default setup on CentOS4 (I don't know for RHEL4).

When installing Plesk after the default setup, the localhost-row with empty pass is erased (I think by the psa-installer) but from that moment on, plesk always use the percent-sign when setting up a database.

So, if you erase the localhost with empty-pass line before installing plesk, no problem. Does anyone know a solution how to fix this after plesk has been installed on a server where the localhost/empty-pass line was present during the installation?
 
If anyone has a solution for this I would be grateful. I can work with the wildcard "allow from anywhere" %, but it doesn't sit right with my paranoid brain.

cheers,
b.
 
Back
Top