When attempting to run a simple: sudo koha-create --create-db NewInstance The password generated lacks special characters which causes newer versions of MySQL (5.7.26 on Bionic) to fail. This can be fixed either by lowering the: set GLOBAL validate_password_policy='LOW'; -- or Adding '-s -y' to all the pwgen calls in the koha-create script. The later is more secure, and thus will be the patch here.
Created attachment 90463 [details] [review] Bug 23090: Add some special characters
TEST PLAN --------- $ sudo mysql -u root > CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'badpassword'; [Magical MySQL Error] > CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'GoodP@ssw0rd'; [Should be okay] > DROP USER 'bug23090_test1'@'localhost'; > QUIT $ sudo koha-create --create-db fail23090 [Magical MySQL Error] [Apply this patch and put it (debian/scripts/koha-create) into place in /usr/sbin/koha-create] $ sudo koha-create --create-db pass23090 Clean up of useless instances is left as an exercise to the reader.
Created attachment 90822 [details] [review] Bug 23090: Add some special characters TEST PLAN --------- $ sudo mysql -u root > CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'badpassword'; [Magical MySQL Error] > CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'GoodP@ssw0rd'; [Should be okay] > DROP USER 'bug23090_test1'@'localhost'; > QUIT $ sudo koha-create --create-db fail23090 [Magical MySQL Error] [Apply this patch and put it (debian/scripts/koha-create) into place in /usr/sbin/koha-create] $ sudo koha-create --create-db pass23090 (Clean up and databases made) Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 90870 [details] [review] Bug 23090: Add some special characters TEST PLAN --------- $ sudo mysql -u root > CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'badpassword'; [Magical MySQL Error] > CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'GoodP@ssw0rd'; [Should be okay] > DROP USER 'bug23090_test1'@'localhost'; > QUIT $ sudo koha-create --create-db fail23090 [Magical MySQL Error] [Apply this patch and put it (debian/scripts/koha-create) into place in /usr/sbin/koha-create] $ sudo koha-create --create-db pass23090 (Clean up and databases made) Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.02
backported to 18.11.x for 18.11.08