Bug 7426 - Let koha-mysql pass on SQL to mysql -e
Summary: Let koha-mysql pass on SQL to mysql -e
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Robin Sheat
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 19:10 UTC by Magnus Enger
Modified: 2012-10-26 00:41 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-01-09 19:10:30 UTC
koha-mysql can be used to "provide an interactive mysql shell set up for the specified koha instance". 

With an option for SQL input, koha-mysql could turn something like this: 

koha-mysql -e "some sql" instancename

into this: 

mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" -e "some sql" "$mysqldb"

This might be handy for e.g. updating a syspref in multiple installations.
Comment 1 Robin Sheat 2012-01-09 20:19:25 UTC
echo "some sql" | koha-mysql instancename

does this. Also good for loading in dumps or whathaveyou.
Comment 2 Magnus Enger 2012-01-10 15:12:48 UTC
Ah, yes, I had a hunch there was something I was missing. Marking as resolved/wontfix.