Unable to Connect with MySQL from Factory PMI

Factory PMI can not connect to the MySQL database. I’ve set the connection to: jdbc:mysql://localhost:3306/test. test is the name of the database. Also, it cannot connect to IADemo that came with. I get the following message:

FAIL (next test in 7 seconds)
Message: (hide details)

Access denied for user ‘root’@‘localhost’ (using password: NO)

Details:
SQLException
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:753)
com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3562)
com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1154)
com.mysql.jdbc.Connection.createNewIO(Connection.java:1702)
com.mysql.jdbc.Connection.(Connection.java:405)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
com.inductiveautomation.gateway.db.DatasourceManager$DSInfo.runTest(DatasourceManager.java:524)
com.inductiveautomation.gateway.db.DatasourceManager$FaultedDatasourceRetryer.run(DatasourceManager.java:400)
java.lang.Thread.run(Unknown Source

Any help would be appreciated.

Access denied for user ‘root’@‘localhost’ (using password: NO)

means that MySQL is refusing the connection based on your permissions and you’re sending it a blank password. Did you have MySQL installed prior to running the unified installer?

If you go to the FPMI gateway configuration page, then Datasources->connections, you can edit that connection to have the correct username and password.

I’ve tried putting in the correct user name and password. The message always says “using password: NO”. The message for the IADemo connection (also FAILED) says “using password: YES”. Everything was installed with the unified installer.

Hmm, this is odd. For the “test” database, when you edit the datasource connection and put in your username and password, ensure that you are also checking the “Change Password” checkbox. It should say Using password: YES (assuming the password is not blank)

The next thing I would do is go into the MySQL Administrator application. If you can log into this, you can get to the “User Administration” section. But, if you can log into this, you should be able to use the same login for FactoryPMI. If you can log into this and the same login doesn’t work for FactoryPMI, ensure that the root user has permissions for the databases that you’re using.

Of course, the Unified Installer should take care of all of these details. If you could, please call us today and we can do an interactive GoToMeeting session to try and figure out what is going on.

Thanks,

Checking the “change password” box worked. (I assumed this allowed changing of the password at the database). Also, I had to reenter the password and check the box for IADemo. Thank for the help

No problem, glad its working.