drush sql-sync error: [mysqldump: command not found] I have a production server set up in my drush aliases as @prod, and a UAT server set up as @uat. I am using MySQL as the database of my Drupal sites. I can successfully execute drush command like drush rsync @prod @uat. However, when I execute

drush sql-sync @uat @prod


Error prompts:

bash: mysqldump: command not found


After googling, the solution is to set the $PATH to include /usr/local/mysql/bin, however, I do not have right to install MySQL client.

Here I have 2 questions:


Is it a must to have mysqldump in order to run drush sql-sync?
If so, apart from installing MySQL client, is there any other way to do it?


Thanks.
Looking at the drush github repo, mysqldump appears to be a
non-negotiable dependency. More broadly speaking, given it's
functionality, I'm unclear why it wouldn't be. So, yes, drush
requires mysqldump for mysql exports.
There's always another way, or expressed without my opinion; "yes." Whether it is a good practice to MacGyver such a solution depends on how much free time you have. There's an interesting php implementation of mysqldump discussed here, but here's where my caveat becomes more clear. Check out the commit activity page — not bad, but on the sparse side for a production solution for my tastes and capacity. So the answer may really depend on how much of this development your client is willing to absorb.


Personally, I'd either convince my sysadmin to allow mysqldump (something I haven't had to do in years) or move my site to a host that will provide such a basic service.

ps: I may be wrong but the Backup and Migrate may give you mysql export capability without mysqldump.