Bug 7426

Summary: Let koha-mysql pass on SQL to mysql -e
Product: Koha Reporter: Magnus Enger <magnus>
Component: PackagingAssignee: Robin Sheat <robin>
Status: CLOSED WONTFIX QA Contact: Ian Walls <koha.sekjal>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

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.