# Dreamfactory returning 500 on an active local MySQL DB

**URL:** <https://community.dreamfactory.com/t/dreamfactory-returning-500-on-an-active-local-mysql-db/900>\
**Category:** REST API\
**Created:** [March 2, 2015, 2:35am UTC](https://community.dreamfactory.com/t/dreamfactory-returning-500-on-an-active-local-mysql-db/900 "2015-03-02T02:35:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codingpuppy](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@codingpuppy](https://community.dreamfactory.com/u/codingpuppy)\
**Post date:** [March 2, 2015, 2:35am UTC](https://community.dreamfactory.com/t/dreamfactory-returning-500-on-an-active-local-mysql-db/900/1 "2015-03-02T02:35:59Z")

</div>

My server (a LAMP stack) is running, and I can see that MySQL is listening on port 3306 on localhost (127.0.0.1). So I created a service in the Dreamfactory admin as Remote SQL DB, and the connection as `mysql:host=localhost;dbname=testdb` I also tried replacing `localhost` with the ip, and adding the port. But I keep getting `"Failed to launch service &quot;maindb&quot;: CDbConnection failed to open the DB connection"` Any help is very appreciated.

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [March 2, 2015, 7:37pm UTC](https://community.dreamfactory.com/t/dreamfactory-returning-500-on-an-active-local-mysql-db/900/2 "2015-03-02T19:37:41Z")

</div>

Can you `telnet localhost 3306`?

Beyond that, we will need to see what’s logged in your DSP’s logs when it fails to connect before we know much more.

---

<div class="post-metadata">

**Author:** ![codingpuppy](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@codingpuppy](https://community.dreamfactory.com/u/codingpuppy)\
**Post date:** [March 2, 2015, 8:58pm UTC](https://community.dreamfactory.com/t/dreamfactory-returning-500-on-an-active-local-mysql-db/900/3 "2015-03-02T20:58:55Z")

</div>

Thanks for responding. I did a local Dreamfactory installation, and it is working now.
