For reasons that are unclear, the user created by koha-restore will not allow Koha to log into MySQL (oddly, an identical script worked fine for me on my 3.6.3-based install). The result is that after running koha-restore on a new system (and possibly even when just restoring a backup), Koha is entirely nonfunctional. Patch forthcoming.
Sorry, my mistake. MySQL 5.5 on Precise Pangolin does recognize '%' as a host wildcard that includes localhost.
I changed my mind. This is a bug. The packages will not work under Ubuntu 12.04. This is problematic.
Do you know why?
(and under what circumstances?)
Sorry, didn't notice the question. When MySQL is on the same host and the --create-db option is used on koha-create, the database users created by the script are not used by the web server because of a combination of % not matching localhost (I think), and anonymous users taking precedence over non-anonymous users in MySQL 5.5.
Going to take a look at this now.
Created attachment 11038 [details] [review] 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
These should go in to 3.6 and 3.8 also I think.
Perhaps you could take advantage of modiying this file to remove the useless use of cat: [ `cat $PASSWDFILE | grep "^$name:"` ] can be replaced with [ ` grep "^$name:" $PASSWDFILE ` ] It seems good but I have not Ubuntu for testing.
Created attachment 11180 [details] [review] 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.
(In reply to comment #10) > Created attachment 11180 [details] [review] > Bug 8162: allow packages to work on Ubuntu Precise > > Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> > Works as promised. i'm going to pass QA on this, despite Jonathan's 'cat' suggestion (hope thats ok) mason@xen1:~/git/head$ koha-qa.pl * c1f0e96 Bug 8162: allow packages to work on Ubuntu Precise debian/scripts/koha-create debian/scripts/koha-remove - perlcritic-progressive tests... OK - perl -c syntax tests... OK - xt/tt_valid.t tests... OK - xt/author/valid-template.t tests... OK
Important patch, will allow the packages to work cleanly on Ubuntu 12.04 for 3.8.4 pushed to 3.8.x
Patch pushed to master today (I haven't tested it, I haven't the needed environment)