dgb icon indicating copy to clipboard operation
dgb copied to clipboard

DGB executing mysqldump twice?, errcode 13

Open ohlittlebird opened this issue 12 years ago • 2 comments

Disclosure: I have no idea what I'm doing.

I have Drupal and Git up and running on my local machine (WAMP), but when trying to use drush dgb-dump from my root Drupal directory, I get the error message: mysqldump: Can't create/write to file '../databases/default.sql' (Errcode: 13)

Which I find odd, because I can use straight up mysqldump or drush sql-dump to write to that directory and filename.

I look at the full command DGB is spitting out in my drush prompt, and notice a semi-colon and a repeat of "mysqldump". Here's what I get, with names changed:

C:\wamp\www\repo\sitename>drush dgb-dump Dump command: mysqldump --result-file ../databases/default.sql --single-transaction --opt -Q databasename --host=localhost --user=username --password=longpassword --skip-extended-insert --order-by-primary --ignore-table=databasename.cache --ignore-table=databasename.cache_block --ignore-table=databasename.cache_bootstrap --ignore-table=databasename.cache_field --ignore-table=databasename.cache_filter --ignore-table=databasename.cache_form --ignore-table=databasename.cache_image --ignore-table=databasename.cache_menu --ignore-table=databasename.cache_page --ignore-table=databasename.cache_path --ignore-table=databasename.flood --ignore-table=databasename.history --ignore-table=databasename.search_dataset --ignore-table=databasename.search_index --ignore-table=databasename.search_node_links --ignore-table=databasename.search_total --ignore-table=databasename.sessions --ignore-table=databasename.watchdog; mysqldump --no-data --single-transaction --opt -Q databasename --host=localhost --user=username --password=longpassword --skip-extended-insert --order-by-primary cache cache_block cache_bootstrap cache_field cache_filter cache_form cache_image cache_menu cache_page cache_path flood history search_dataset search_index search_node_links search_total sessions watchdog >> ../databases/default.sql

mysqldump: Can't create/write to file '../databases/default.sql' (Errcode: 13)

I don't know if this is intended behaviour (error aside), but I copied the code out, and ran the first half (up to the semi-colon) and the second half separately, and both created ../databases/default.sql with no problems. Together, Errcode: 13.

Is this dump command what DGB is supposed to produce? Any ideas why I can use sqldump but not DGB?

ohlittlebird avatar Feb 14 '13 16:02 ohlittlebird

the double mysqldump is expected, the first one is for the data, the second one is for the table structure of the tables whose data is ignored.

I don't have a windows machine to test this sadly. which version of drush are you using?

scor avatar Feb 14 '13 21:02 scor

I'm using version 5.8 (7.x-5.8) on both Windows machines I've seen this on.

ohlittlebird avatar Feb 14 '13 21:02 ohlittlebird