http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6517 Bug #: 6517 Summary: koha-create wants "use database" in DEFAULTSQL Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Packaging AssignedTo: robin@catalyst.net.nz ReportedBy: magnus@enger.priv.no QAContact: koha-bugs@lists.koha-community.org If koha-create is given the path to a DEFAULTSQL in /etc/koha/koha-sites.conf, it looks like it expects to find a statement similar to this at the top of that file: use koha___KOHASITE__; This piece of the code will then replace __KOHASITE__ with the name of the site being created: # Populate the database with default content. zcat "$DEFAULTSQL" | sed "s/__KOHASITE__/$name/g" | mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd" As far as I can see this means one has to remember to add the use koha___KOHASITE__; to the file whenever a new DEFAULTSQL is created. Wouldn't it be easier and less error prone to make mysql use the right database by including the name of the database in the call to mysql? Something like this: # Populate the database with default content. zcat "$DEFAULTSQL" | mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd" $mysqldb -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.