Remote MySQL Versions Supported?


#1

Maybe I’m just not looking in the right place (checked docs, community form, and githut), but I can’t find what version of MySQL (for remote connections) dreamfactory works with or requires?

As well as what specific modules (and version) must be installed.

I can NOT use the MySQL included in dreamfactory on my linux system as I’m in a somewhat restricted facility, and must run the administered MySQL version provided (5.1.56), and can’t change it.

I can connect to the MySQL db with command line from my local system, from a remote server, and other tools, but I can not get dreamfactory 1.9.1 (running on the free-dsp or from my linux system) to connect.

I’m just getting back a 500 error.

Thanks for any insight.


#3

Hi @kenjikato, what is logged in your DSP’s logs when the connection error is reported?


#4

@jeffreystables thanks for the reply!

I’m not sure where to get the DSP’s logs from, other than the DreamFactory Live API Documentation testing section. I’m not seeing DSP’s info in my standard system log.

Here’s what I’m getting out of the API test when I hit “Try it out!” under the “getTables() - List all table names”, or any of the other test, when running from the DreamFactory Service Platform test I setup. But I’m seeing the same thing out of my own system as well.

{
  "error": [
    {
      "context": null,
      "message": "Failed to launch service "dh_mysql": CDbConnection failed to open the DB connection.",
      "code": 500
    }
  ]
}

{
  "Pragma": "no-cache",
  "Date": "Tue, 07 Apr 2015 11:45:03 GMT",
  "Server": "nginx",
  "Transfer-Encoding": "Identity",
  "P3p": "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"",
  "Cache-Control": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
  "Connection": "keep-alive",
  "Content-Type": "application/json; charset=utf-8",
  "Expires": "Thu, 19 Nov 1981 08:52:00 GMT"
}

I can access the remote MySQL DB from the command line on the same system I have DreamFactory installed on. Given that the MySQL version with DreamFactory downloaded seemed to be 5.5 I wondered if it was a version incompatibility.

But I’m just shooting in the dark here. Given the other things I’ve found around the forums now I’m not sure it’s the version, and more likely just a formatting of the access string, or access issue.

I have verified that the end server, where MySQL is, has an exception for my local system (which I’ve tested with command line access to MySQL successfully), and I have added one in for what I found in an obscure post seems to be the DreamFactory Hosted DSPs IP (23.23.78.250). The port is the standard 3306 that the MySQL is accessed over.

I’ve even tested this with other MySQL DBs I have access to, from service providers like DreamHost, and I get the same results.

I will say that all the servers I run, or use from other providers, are running nginx as the front end service and load balancer, and in some cases is the only front end server running (no apache server).

So any info or what to check next would be welcomed!

Thanks!


#5

Thanks for all the info! The DSP’s logs will be in the /platform/log directory wherever you installed DSP. The files are named web.*.log. If you used a Bitnami package, you will find the log directory at {Bitnami install path}/apps/dreamfactory/htdocs/log.


#6

By the way, I think you’re right here. We haven’t encountered any versions of MySQL that have caused us a problem before.


#7

I don’t see any log files in the log folder except for the install log.

I did NOT use a bitnami installer. I followed through the install instructions I found on the github repo: https://github.com/dreamfactorysoftware/dsp-core/wiki/Install-Debian-Ubuntu
Except for the MySQL part that is, I had to manually setup the dreamfactory db, and user account in the managed MySQL server. I’ve verified again that they seem to be setup to what you would do via command line.

I’m running Ubuntu 12.04.5 on both my local and remote serve, but don’t run apache unless I have to given I’m using nginx and node.js primarily for speed and security.

I really like the use design of dreamfactory for setting up REST services, but at this point I’m assuming unless I go to a virtual machine (running on say AWS), or a different server where I can install with bitnami and run a full up apache server I probably am not going to be able to get dreamfactory running.

Unless you have some other ideas for me to try.

I will say that I’m seeing the same behavior from the free dreamfactory hosted test. So it also tells me that there is some special magic that I need to have in place for dreamfactory to see my remote MySQL servers.

Any other insight is welcomed.

Thanks!


#8

We have many active connections to MySQL from DSPs installed in quite a variety of environments. In fact, the DSP’s own database is MySQL, so MySQL is natively supported without needing any drivers or modifications.

It is impossible that you don’t have web.*.log files being written if you have logged into your admin console, because these logins are logged in these DSP log files. Unless your installation was not completed properly, these logs will be there; and they will contain the error that describes your MySQL connection issue.


#9

Hi, @kenjikato
Did you find any solution for this? I have the same trouble, and still can’t find anything. No logs, nothing…


#10

@Cheshire_Kat do you mean that there is no log file or that there are no relevant entries?

To be clear, if you follow the manual install instructions verbatim you will have a web.*.log file in the folder /opt/dreamfactory/platform/log/


#11

@drewpearce, no logs - mean that there is no relevant entries in log files.

I think i found what’s wrong.

I just founded that i can access my custom database tables in platform, attached to Local DB SQL service. So, i can use them, and this is ok.
My database is located in same place where is dreamfactory database located. I thought that i should create a new service, and use my SQL db as remote.

Thank you for reply, anyway!


#12

Glad you have something working.

You should be able to add localhost as a remote sql db service, however if you are not getting errors logged then it would be very difficult to troubleshoot.