Bug 8162: allow packages to work on Ubuntu Precise
authorRobin Sheat <robin@catalyst.net.nz>
Fri, 20 Jul 2012 10:20:47 +0000 (12:20 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 29 Aug 2012 11:46:04 +0000 (13:46 +0200)
commitaba36d26d93c609e7ae963cbcdb5173ed8f54e74
tree5f590cea31025ee23f6ec9ce6a091eabcc95cd47
parent913aba1a6639e00535cdb631ed2ca80cbe80289f
Bug 8162: allow packages to work on Ubuntu Precise

The newer version of MySQL in Ubuntu 12.04 installs a default
'localhost' user with no username. Due to the way that MySQL looks up
user details when you connect, if you connect from localhost and the
user was only created with a wildcard host (%), the anonymous localhost
user will be found instead. This means that your username is lost for
the connection, and you have no privileges.

This patch creates a second user with a hostname of 'localhost'. This
will not work if your database is on a remote server, but you probably
know what you are doing if that's the case. Patches to determine this
server's name relative to the MySQL server are welcome (or even ideas on
how to do it.)

It also fixes up a couple of other small things:
* make koha-remove stop zebra properly
* stop the warning that the password file is missing on create

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Works as promised.
debian/scripts/koha-create
debian/scripts/koha-remove