Permalink
Browse files

host specifation in mysql remote operations

I had this problem on servergrove.com. With localost it does not run, you need to specify sg111.servergrove.com as host. This is only a proposal. 
  • Loading branch information...
danielsan80 committed Dec 20, 2012
1 parent 7f2bc7a commit eee2b9660fc1cc785f90bfb9fb6c39c470294a18
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/symfony2/database.rb
View
@@ -17,7 +17,7 @@
case config['database_driver']
when "pdo_mysql", "mysql"
- run "#{try_sudo} mysqldump -u#{config['database_user']} --password='#{config['database_password']}' #{config['database_name']} | gzip -c > #{file}" do |ch, stream, data|
+ run "#{try_sudo} mysqldump -u#{config['database_user']} --host='#{config['database_host']}' --password='#{config['database_password']}' #{config['database_name']} | gzip -c > #{file}" do |ch, stream, data|
puts data
end
when "pdo_pgsql", "pgsql"
@@ -112,7 +112,7 @@
case config['database_driver']
when "pdo_mysql", "mysql"
- run "#{try_sudo} mysql -u#{config['database_user']} --password='#{config['database_password']}' #{config['database_name']} < #{remote_tmp_dir}/#{sqlfile}" do |ch, stream, data|
+ run "#{try_sudo} mysql -u#{config['database_user']} --host='#{config['database_host']}' --password='#{config['database_password']}' #{config['database_name']} < #{remote_tmp_dir}/#{sqlfile}" do |ch, stream, data|
puts data
end
when "pdo_pgsql", "pgsql"

0 comments on commit eee2b96

Please sign in to comment.