I am using drush 5.8 on Mac OSX
drush sql-query returns nothing at all, can't see to get any response whatsoever if I run (as example) drush sql-query "show tables;" from sites/default
the only response I can get is if I run the command above from above/outside the site root - and that is the "No database to operate on." error..
could be a very handy feature of drush for me, but I'm clueless on how to make it work and `drush help sql-query` doesn't provide me with any clues as where to execute from...
TIA
* Tim Johnson tim@akwebsoft.com [131104 10:53]:
I am using drush 5.8 on Mac OSX
drush sql-query returns nothing at all, can't see to get any response whatsoever if I run (as example) drush sql-query "show tables;" from sites/default
the only response I can get is if I run the command above from above/outside the site root - and that is the "No database to operate on." error..
could be a very handy feature of drush for me, but I'm clueless on how to make it work and `drush help sql-query` doesn't provide me with any clues as where to execute from...
Sorry, I should have included more of a demonstration of the issue .. from my user root :
bash-3.2$ drush sql-query 'show table;' No database to operate on.
To be expected...
from my site root - deliberate error
/Users/http/sites/akwebsoft bash-3.2$ drush sql-query 'show nothing;' ERROR 1064 (42000) at line 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 'nothing' at line 1
Also to be expected now a valid command :
bash-3.2$ drush sql-query 'show tables;' bash-3.2$
Where's the output??
* Tim Johnson tim@akwebsoft.com [131104 11:30]:
- Tim Johnson tim@akwebsoft.com [131104 10:53]:
I am using drush 5.8 on Mac OSX
drush sql-query returns nothing at all, can't see to get any response whatsoever if I run (as example) drush sql-query "show tables;" from sites/default
the only response I can get is if I run the command above from above/outside the site root - and that is the "No database to operate on." error..
could be a very handy feature of drush for me, but I'm clueless on how to make it work and `drush help sql-query` doesn't provide me with any clues as where to execute from...
Sorry, I should have included more of a demonstration of the issue .. from my user root :
bash-3.2$ drush sql-query 'show table;' No database to operate on.
To be expected...
from my site root - deliberate error
/Users/http/sites/akwebsoft bash-3.2$ drush sql-query 'show nothing;' ERROR 1064 (42000) at line 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 'nothing' at line 1
Also to be expected now a valid command :
bash-3.2$ drush sql-query 'show tables;' bash-3.2$
Where's the output??
Furthermore, if I invoke drush sqlc from the site root, I do get the MySQL cli for the site database, so I can assume that I am making the proper connection properly authenticated.
* Tim Johnson tim@akwebsoft.com [131104 10:53]:
I am using drush 5.8 on Mac OSX
drush sql-query returns nothing at all, can't see to get any
<...> Note to self (and others) `verbose` is your friend. When I invoked drush -v sql-query 'show tables;' I could see that drush was using the value for the drushrc options['result-file'] as an output file. now I can use something like drush -v --result-file=/Users/tim/drush_results.txt sql-query 'show tables;' to capture output in a file or drush -v --result-file= sql-query 'show tables;' to print to stdout
* Tim Johnson tim@akwebsoft.com [131105 11:27]:
- Tim Johnson tim@akwebsoft.com [131104 10:53]:
I am using drush 5.8 on Mac OSX
drush sql-query returns nothing at all, can't see to get any
<...> Note to self (and others) `verbose` is your friend. When I invoked drush -v sql-query 'show tables;' I could see that drush was using the value for the drushrc options['result-file'] as an output file. now I can use something like drush -v --result-file=/Users/tim/drush_results.txt sql-query 'show tables;' to capture output in a file or drush -v --result-file= sql-query 'show tables;'
The above should be `result-file=0`
to print to stdout
Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com, http://www.tj49.com -- [ Drupal support list | http://lists.drupal.org/ ]