View Single Post
  #4  
Old 27th October 2008, 20:06
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,386
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

The MySQL manual explains the access denied as follows:

http://dev.mysql.com/doc/refman/5.1/...ss-denied.html

"If you cannot figure out why you get Access denied, remove from the user table all entries that have Host values containing wildcards (entries that contain “%” or “_”). A very common error is to insert a new entry with Host='%' and User='some_user', thinking that this allows you to specify localhost to connect from the same machine. The reason that this does not work is that the default privileges include an entry with Host='localhost' and User=''. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to delete the entry with Host='localhost' and User=''. After deleting the entry, remember to issue a FLUSH PRIVILEGES statement to reload the grant tables."

So there are two solutions:

1) The recommended: If you want to connect to a database from localhost, do not enable the "Remote access" checkbox in ISPConfig.
2) If you need to access the database from localhost and remotely, simply delete the record in the mysql.user table where host = localhost and username empty:

DELETE FROM mysql.user WHERE Host = 'localhost' AND User = '';
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote