search cancel

Spectrum tomcat MYSQL connection error - "Host <NAME> is not allowed to connect to this MySQL server"

book

Article ID: 187128

calendar_today

Updated On:

Products

CA Spectrum CA eHealth

Issue/Introduction

OneClick stops working (unable to connect) and the following errors are seen in stdout.log;
 
ERROR 1130 (HY000): Host '<HOST_NAME>' is not allowed to connect to this MySQL server
        at com.aprisma.util.mysql.SQLScriptRunner.doRunSQLScript(SQLScriptRunner.java:251)
        at com.aprisma.util.mysql.SQLScriptRunner.runScript(SQLScriptRunner.java:158)
        ... 34 more

Environment

Spectrum 10.x

Cause

There is a localhost record in the /etc/hosts file

Resolution

There's a localhost record in the /etc/hosts file with the same IP address specified as the hostname of the machine. For example:

10.111.222.333 localhost
10.111.222.333 <HOST_NAME>

After commenting out the first line (# 10.111.222.333 localhost), the error message has stopped and OneClick can connect to MySQL.