0

One of my clients insists on using WAMP for hosting Drupal 7. I've always been using Ubuntu for development, but now I have to work with WAMP. I do much Drush administration with sql-dump and modifying Drupal from the command line. I tried Drush on windows, but it is PITA to use.

What are some ways to use Drush as close as possible to the Linux versions? For some reasons, some Drush commands don't properly work on Windows. I usually use drush sql-dump > backup.sql, but in Windows there is no equivalent to that.

3
  • I am using xampp (which I don't think that does make any huge difference in relation to wamp) on windows 7 and drush sql-dump > backup.sql works very well (Drush version 5.8). Actually I don't think that drush is lacking to anything when is used on windows. You don't even need Cygwin to install it and make it run. I'll post a detailed answer later if I have the time.
    – mchar
    Aug 17, 2016 at 14:59
  • That doesn't work. I get the following error: C:\sites\tmsample>drush sql-dump > adsf.sql mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CREATE=1' at line 1 (1064) Database dump failed [error] Aug 17, 2016 at 15:10
  • Check this post, seems to be the case. Your MySQL version does not support the SET OPTION SQL_QUOTE_SHOW_CREATE=1;, read this for more details.
    – mchar
    Aug 17, 2016 at 15:48

1 Answer 1

1

There are four possibilities:

  1. Using Git Bash for Drush. Off the top of my head, this won't work for SQL commands, though
  2. If you're using Windows 10, you may want to install the anniversary edition update. It gives a Linux bash shell. It also has its limits (no kernel modules), but those limits shouldn't impede Drush use
  3. CYGWIN. It may take some fiddling, but may do the trick too
  4. Try and persuade your client to use Vagrant, then run Ubuntu in there
1
  • 5. You can also install it via composer (for windows) and than set it into global enviroment. 6. Installing Acquia Dev Desktop also contains a working drush and a maybe working composer. Sep 7, 2018 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.