Title: Deploy error-database connection failed
Last modified: August 21, 2016

---

# Deploy error-database connection failed

 *  Resolved [hermesd](https://wordpress.org/support/users/hermesd/)
 * (@hermesd)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/deploy-error-database-connection-failed/)
 * Hello,
 * I am trying to deploy a site developed on a localhost using XAMPP 1.7.3 on a 
   Mac (OS 10.9).
 * When I try to deploy the package of my local site onto the domain hosted on the
   mediatemple.net grid service, I get an error when I test the database connection
   before actually deploying. The error is:
 * DATABASE CONNECTION FAILED!
    Can’t connect to local MySQL server through socket‘/
   var/run/mysqld/mysqld.sock’ (2)
 * As far as I can tell everything is set up properly with the right db name, user
   and password.
 * Any insight would be appreciated. Thanks.
 * H
 * [http://wordpress.org/plugins/duplicator/](http://wordpress.org/plugins/duplicator/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/deploy-error-database-connection-failed/#post-4415661)
 * Hey hermesd,
 * If recall there are some workaround on the FAQ for mysqld.sock issues:
    -> Browse
   to: [http://lifeinthegrid.com/duplicator-faq](http://lifeinthegrid.com/duplicator-faq)-
   > Find section: “3. Troubleshoot=> Database Issues”
 * Hope that helps!
 *  Thread Starter [hermesd](https://wordpress.org/support/users/hermesd/)
 * (@hermesd)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/deploy-error-database-connection-failed/#post-4415673)
 * That solved the problem. Just so you know, mediatemple.net is another provider
   where localhost doesn’t work as the host name.
 * Here is a link to their knowledge base showing the format for host name, in case
   you want to add it to the FAQ.
 * [https://kb.mediatemple.net/questions/4/Why+can%27t+I+connect+to+my+MySQL+database+from+PHP%3F#gs](https://kb.mediatemple.net/questions/4/Why+can%27t+I+connect+to+my+MySQL+database+from+PHP%3F#gs)
 * Thanks!
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/deploy-error-database-connection-failed/#post-4415682)
 * Thats good to hear! Thanks for the link and update!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Deploy error-database connection failed’ is closed to new replies.

 * ![](https://ps.w.org/duplicator/assets/icon-256x256.png?rev=2906985)
 * [Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More](https://wordpress.org/plugins/duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicator/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [deploy](https://wordpress.org/support/topic-tag/deploy/)

 * 3 replies
 * 2 participants
 * Last reply from: [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/deploy-error-database-connection-failed/#post-4415682)
 * Status: resolved