c10b10 / wp-cli-deploy

A WP-Cli command that allows you to deploy the local database or uploads directory to a remote server using ssh.
173 stars 25 forks source link

Unknown MySQL server host #25

Open wfendler opened 8 years ago

wfendler commented 8 years ago

Trying to push to production. Does this just mean my database host is wrong?

$ wp deploy push production --what=db
Success: Exported a local backup of the database to '/Users/william/Sites/website/production_1ae32032/tmp/7111aa93'.
Success: Replaced 'website.dev' with 'website.com' in local database.
Success: Replaced '/Users/william/Sites/website' with with '/home/b8f92860709466/html' in local database.
Success: Dumped the database to '/Users/william/Sites/website/production_1ae32032/tmp/7111aa93.sql'.
Success: Imported the local backup.
Success: Cleaned up.
[user]@[server]'s password: 
building file list ... done
7111aa93.sql

sent 147419 bytes  received 42 bytes  6858.65 bytes/sec
total size is 883449  speedup is 5.99
Success: Uploaded the database file to '/home/b8f92860709466/html/Williams-MacBook.local_production.sql' on the server.
[user]@[server]'s password: 
ERROR 2005 (HY000): Unknown MySQL server host '[dbserver]:3309' (0)

I've connected to the database via Sequel Pro without any issues. But I get this error when trying to deploy. And this one when trying to pull the database:

mysqldump: Got error: 2005: Unknown MySQL server host '[dbserver]:3309' (0) when trying to connect

Would this be some configuration on my server that would be preventing this or does it look like something else may be wrong?

c10b10 commented 8 years ago

I think it's something in your config.

To debug, define add define( 'WP_DEPLOY_DEBUG', 'all' ); to you wp-config.php and rerun the command.

This will just print out the commands that the plugin would run. You should see the mysql import command that fails, and you should be able to check more precisely.