Error logging to MySql on premises


#1

I have installed dreamfactory 1.9.4-3 on my Centos release 6.3 (Final), onto the same machine is already present a MySQL 5.5.36.

To clarify, on this machine now I have two mysql, the one coming with the installation of dreamfactory and binded to the port 13306, and a second already present at installation moment bind at the port 3306

In this configuration, any access to my “old” MySql fail with the log “Failed to launch service “test”: CDbConnection failed to open the DB connection.”

The web.10.log says:

[2015-10-13 07:44:22][app][ERROR ] REST Exception #500 > Failed to launch service “test”: CDbConnection failed to open the DB connection. {“host”:“10.172.79.51”,“request_uri”:"/rest/test",“source_ip”:“10.21.XX.XX”,“sapi_name”:“apache2handler”}
[2015-10-13 07:44:22][app][ERROR ] SQLSTATE[HY000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES)

Any suggestion to connect my “old” DB?


#2

This error message indicates that either the credentials you’ve supplied for the root user on your “old” MySQL DB are incorrect, or that user is not permitted to connect remotely, or the DB is not configured to allow remote connections.


#3

You are right, but if I try to log to my “old” MySQL using the binary of the 5.5.36 version I can log without error, meanwhile with the binary of the MySQL coming with dreamfactory I have the Access Denied problem.

To clarify, if use
./mysql -hlocalhost -uroot --port 3306 -p
with the 5.5.36 binary, no Access Denied was displayed

the same but with the binary 5.6.26 I’ve the “Access Denied” trouble

Seems that dreamfactory use a binary not fully retocompatible with MySQL.

Did you have any experience in that sense?


#4

Are those results from using the command line mysql command connected to DreamFactory in some way? Or are you saying the behavior from command line and from within DreamFactory is identical?


#5

The behavior from command line (using 5.6.26 binary coming with the DreamFactory installation) and from within DreamFactory is identical, I have always a report of “access denied”

I can add also that if I try to connect to my 5.5.36 MySQL DB from another computer using (for example) MySQL Control Center, the connection was fine.

I tell you this to demonstrate that my “old” MySQL is fully connectable also from remote

Thanks in advance


#6

I solved the problem, the trouble born when you try to connect a MySQL on premises and address this using the syntax “host=localhost”, in that case the MySQL binaries ignore the port parameter and use the socket instead.
Then it’s easy to convert this connection string from
mysql:host=localhost;dbname=test;port=3306 (not working)
with this
mysql:host=127.0.0.1;dbname=test;port=3306 (ok)

This worked for me, hope this can help someone else