• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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