Closed (fixed)
Project:
Drush
Component:
SQL
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
29 May 2012 at 13:30 UTC
Updated:
20 Jun 2012 at 20:01 UTC
Jump to comment: Most recent, Most recent file
This is related to #994702: Improve error message regarding mismatched tmp directories when sql-syncing between systems with different fs layout but appears to be a separate issue -- or rather a separate instance of the same bug.
$ drush sql-sync @foo.dev @foo.test
You will destroy data from foobar.baz.com/xxxxxx and replace with data from [local db name].
You might want to make a backup first, using the sql-dump command.
Do you really want to continue? (y/n): y
Could not open required defaults file: /private/tmp/drush_VzYq3r
Fatal error in defaults handling. Program aborted
ERROR 1045 (28000): Access denied for user 'xxxxxx'@'localhost' (using password: NO)
Apparently this commit introduced this bug as a regression -- sql-sync works fine for me when pushing drush back to the commit prior to that one.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | sql-sync-mac.txt | 2.77 KB | Anonymous (not verified) |
| #7 | sql-dump-fail.txt | 4.34 KB | chiebert |
| #4 | sql-sync-fix.patch | 978 bytes | anarcat |
Comments
Comment #1
circuscowboy commentedSame problem - linux to linux - back to 5.1 and all working fine.
I have an alias set for both aliases
'path-aliases' => array(
'%dump-dir' => '/var/drush/drush-dumps',
),
Comment #2
greg.1.anderson commentedLooks like the credential-leak fix needs to be fixed some more for remote commands.
Comment #3
moshe weitzman commentedI just reverted #671906: mysql credentials leak in drush sqlc.
Comment #4
anarcat commentedThe correct patch is attached, sorry, my bad.
Comment #5
rickmanelius commented#4 didn't fix this for me (running drush 5.3)
I get
Could not open required defaults file: /private/tmp/drush_q3ZPZJ
Fatal error in defaults handling. Program aborted
Database dump failed
Comment #6
anarcat commentedThat is strange. I do not understand (1) why the tmpfile is in /private and (2) why the tmpfile is used in the first place... i thought I covered all the _connect() calls...
Can you provide a full log with --debug?
Thanks for the testing!
Comment #7
chiebert commentedI just ran into this after installing 5.3 using the pear method for the first time. I uninstalled 5.3 and installed 5.1 as #1 and it all works again. Attached is the output from
sql-dump @live @dev --no-cache --debug(5.3, not patched with #4).Notes:
Comment #8
fuzzy76 commentedThe patch in #4 doesn't make any difference for me on 5.3 either (had to apply it by hand). This is pretty crucial. :(
Comment #9
Anonymous (not verified) commentedI have this problem too. I don't understand it, but I can attach a log and mention some things I don't see in the thread already.
The problem is in the command quoted:
The important part I see is:
ssh .. 'if ... ; then mysqldump --defaults-file=/private/tmp/drush_obhGjB ....
I put a breakpoint at the top of _drush_sql_get_credentials(). The file with the password /private/tmp/drush_obhGjB is being created on my local environment. On Max OS X, /tmp is a symlink to /private/tmp. Presumably the defaults file has to be moved to the remote host or created there because the mysqldump command is being run there.
Comment #10
chiebert commentedI notice that 5.4 is now available on the project page as well as the PEAR channel. I just tested it (same setup as in my original post in #7) and I was able to sql-sync both directions without a problem. So, whatever was committed between 5.3 and 5.4 seems to have done the trick in my situation (and the release notes reference the sql-* command bugs).
Comment #11
greg.1.anderson commentedPlease re-open if there is more to do that has not already been committed.