[Koha] [Important] Update your MySQL|MariaDB configuration to avoid data loss
J.P.Knight at lboro.ac.uk
Wed Aug 2 21:45:38 NZST 2017
On Tue, 1 Aug 2017, Bortel, Gary wrote:
> For a multi-tenant installation with multiple MySQL databases...
> "The Solution"
> recommends adding "init-file=/var/lib/mysql/init-file_kohadev.sql" in
> the my.cnf MySQL configuration file, then creating the appropriately
> configured "init-file_kohadev.sql" file. Where there are multiple Koha
> databases, should one add multiple "init-file=..." statements to my.cnf
> as well as multiple init-file_kohadev.sql files? Or will MySQL only
> accept one init-file directive in which case the .sql file would include
> multiple blocks of code...one for each database?
I'd say that its up to you really - both will work. If you use just one
"init-file_kohadev.sql" file you'll just have to repeat all the SQL, just
changing the database in the "use" line. If you've got lots of Koha
instances that file is going to be quite long.
Personally for tidiness and ease of maintenance I'd probably opt for one
init file per Koha database, as those would be clearer and could then be
maintained more easily using normal Linux command line tools and a few
Perl scripts. I assume people hosting lots of tenants are probably
using tools like Ansible to set up provisioning of a new Koha instance so
these files would be created from a template and just one line
added/removed from the my.conf file.
More information about the Koha