[opencms-dev] MySQL 'Access denied' error during setup (6.2 beta)

Matthew Fremont matthew at cyclepaths.com
Wed Mar 1 19:54:53 CET 2006


While trying to install 6.2 beta, the setup wizard kept encountering an 
"access denied" error while trying to create the OpenCms tables.

I tried "grant all on opencms.* to opencms at localhost identified by ...", 
but that didn't solve the problem.

It seems like the source of the problem was the anonymous localhost 
account created by the mysql install. Here's an explanation from the 
MySQL Reference:*

**Warning:* If you allow anonymous users to connect to the MySQL server, 
you should also grant privileges to all local users as 
|/|user_name|/@localhost|. Otherwise, the anonymous user account for 
|localhost| in the |mysql.user| table (created during MySQL 
installation) is used when named users try to log in to the MySQL server 
from the local machine. For details, see Section 5.7.5, “Access Control, 
Stage 1: Connection Verification” 
<http://dev.mysql.com/doc/refman/4.1/en/connection-access.html>

I removed the anonymous account using the following statements and the 
setup wizard was able to create the tables without error:

DELETE FROM mysql.user WHERE Host='localhost' AND User='';
FLUSH PRIVILEGES;


Perhaps this should find its way into the OpenCMS install.html?


Matthew



More information about the opencms-dev mailing list