cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL Connectivity

tehuti
Champ in-the-making
Champ in-the-making
I have installed a Alfresco 3.3g on CentOS and get the following error in alfresco.log:

    Caused by: java.sql.SQLException: null,  message from server: "Host 'x.x.x.x' is not allowed to connect to this MySQL server"
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
The MySQL server at x.x.x.x can be accessed within a shell, from the command line.
All databases are complete and correct.

Does anyone know what is going on here?

Cheers,

Gavin.
3 REPLIES 3

heiko_robert
Star Collaborator
Star Collaborator
Hi Gavin,
is your MySQL server located on another server? In that case you need to allow remote user to connect:
e.g. in mysql as user root:
//grant access to user-remote host combination
GRANT ALL ON alfresco.* to alfrescouser@'yourremotehost' IDENTIFIED BY 'newpassword';
//force update of authorization changes
FLUSH PRIVILEGES;

please replace alfresco with your database name, alfrescouser with your user name and yourremotehost with your alfrescoserver ip

to open up for word accesss try (not recommented)
GRANT ALL ON alfresco.* to alfrescouser' IDENTIFIED BY 'newpassword';

regards
Heiko

pondermuse
Champ in-the-making
Champ in-the-making
Hi,

I am getting an org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (null, message from server: "Host 'remoteservername.domain.com' is not allowed to connect to this MySQL server"). This error is given even after granting privileges as instructed in this thread.

Could there be any other reasons why this error happens?

I am running two Alfresco 3.3 Community Edition servers on Windows XP boxes where One is configured to connect to the other server's content store and mysql db.

Thanks in advance for any help on this.

Regards,
PM.

pondermuse
Champ in-the-making
Champ in-the-making
Hello,

Please ignore my last question. The problem was that the mysql server I was trying to connect to was running on port 3309 and not the default 3306. Still confused about the error it gave though as I would have expected a 'MySQL server not found' type error in this sort of case…

Regards,
PM