Created attachment 51046 [details] Web Installation Error OS: Ubuntu 16.04 Type: Ubuntu package installation Koha: Current Stable Version on 29th April 2016 Blank Database creation was successful. Very first login prompted for password. At Step 3 persistent error: The following error occurred while importing the database structure: mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1171 (42000) at line 1385: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead Please contact your system administrator On second instance creation - did not appear Login Page at all.
Hello Gopalakrishna, Please try to comment the sql_mode=STRICT_TRANS_TABLES line in your MySQL/MariaDB config file.
I attempted to change the sql_mode as suggested and the error persists upon trying to import the database structure. The file /usr/share/koha/intranet/cgi-bin/installer/data/mysql/kohastructure.sql needs to be updated to comply with the changes introduced in MySQL release 5.7.3. See: http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-3.html Specifically: Columns in a PRIMARY KEY must be NOT NULL, but if declared explicitly as NULL produced no error. Now an error occurs. For example, a statement such as CREATE TABLE t (i INT NULL PRIMARY KEY) is rejected. The same occurs for similar ALTER TABLE statements. (Bug #13995622, Bug #66987, Bug #15967545, Bug #16545198) Since I don't know much about how the database needs to be structured to properly function, I'll just call out the fields that MySQL is erroring out on in kohastructure.sql rather than attempting to write my own patch. On line 1385: CREATE TABLE 'letter' uses 'branchcode' as part of its PRIMARY_KEY, but is "default NULL" On line 2476: CREATE TABLE 'permissions' uses 'code' as part of its PRIMARY_KEY but is "DEFAULT NULL" If I change those two (branchcode and code) to be "NOT NULL", I am able to get the installer to continue, but as I stated above, I don't know if this is the correct fix as I don't know how this impacts the database structure for the usability of koha.
Created attachment 51235 [details] [review] Bug 16402: Make kohastructure.sql valid for MySQL v5.7 A primary key should not contain null value, and MySQL v5.7 is now more strict and won't accept our errors in the DB structure. Test plan: mysql < installer/data/mysql/kohastructure.sql should work using MySQL v5.7 QA: - letter.branchcode should not be NULL, the default (all) is an empty string - permissions.code should not be NULL, it's always a string
Hey there, Was having this same problem. Just wanted to give you all a shout-out for the fix. Was having trouble locating the file but eventually got it all worked out. Still ended up getting:: mysql: [Warning] Using a password on the command line interface can be insecure. but I found a workaround for that and now i've created and access the staff interface via command line. I am still having some trouble connecting via web-browser, but I suspect it's because I just set my nameservers up earlier today and they haven't had time to propagate. I hope that is the "problem" at least. Otherwise I may need to figure out my host files, .conf files, or the proper settings for my server's DNS manager. Anyway, thanks again.
If one of you could tell that Jonathan's patch works (sign off on it), this would help to get the fix into Koha :)
*** Bug 16393 has been marked as a duplicate of this bug. ***
Created attachment 51301 [details] [review] [SIGNED-OFF] Bug 16402: Make kohastructure.sql valid for MySQL v5.7 A primary key should not contain null value, and MySQL v5.7 is now more strict and won't accept our errors in the DB structure. Test plan: mysql < installer/data/mysql/kohastructure.sql should work using MySQL v5.7 QA: - letter.branchcode should not be NULL, the default (all) is an empty string - permissions.code should not be NULL, it's always a string Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Clean install of Ubuntu 16.05, MySQL 5.7.11 kohastructure.sql loads ok, just one warning No errors
(In reply to Richard Gardner from comment #4) > Hey there, > > Was having this same problem. Just wanted to give you all a shout-out for > the fix. Was having trouble locating the file but eventually got it all > worked out. > > Still ended up getting:: > > mysql: [Warning] Using a password on the command line interface can be > insecure. > > but I found a workaround for that and now i've created and access the staff > interface via command line. I am still having some trouble connecting via > web-browser, but I suspect it's because I just set my nameservers up earlier > today and they haven't had time to propagate. I hope that is the "problem" > at least. > > Otherwise I may need to figure out my host files, .conf files, or the proper > settings for my server's DNS manager. > > Anyway, thanks again. Hello Richard, I did not find the file. Could you please give me a hint? Thanks
Upping severity as this blocks people from being able to install Koha.
Hm, I think this will work for new installations, but shouldn't we change existing ones to match?
Created attachment 51305 [details] [review] [PASSED QA] Bug 16402: Make kohastructure.sql valid for MySQL v5.7 A primary key should not contain null value, and MySQL v5.7 is now more strict and won't accept our errors in the DB structure. Test plan: mysql < installer/data/mysql/kohastructure.sql should work using MySQL v5.7 QA: - letter.branchcode should not be NULL, the default (all) is an empty string - permissions.code should not be NULL, it's always a string Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Clean install of Ubuntu 16.05, MySQL 5.7.11 kohastructure.sql loads ok, just one warning No errors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Katrin Fischer from comment #10) > Hm, I think this will work for new installations, but shouldn't we change > existing ones to match? Yes indeed we must, I have thought about that during the week-end :) Patches coming soon...
Created attachment 51328 [details] [review] Bug 16402: Fix fox existing installations
Created attachment 51540 [details] [review] Bug 16402: Make kohastructure.sql valid for MySQL v5.7 A primary key should not contain null value, and MySQL v5.7 is now more strict and won't accept our errors in the DB structure. Test plan: mysql < installer/data/mysql/kohastructure.sql should work using MySQL v5.7 QA: - letter.branchcode should not be NULL, the default (all) is an empty string - permissions.code should not be NULL, it's always a string Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Clean install of Ubuntu 16.05, MySQL 5.7.11 kohastructure.sql loads ok, just one warning No errors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 51541 [details] [review] Bug 16402: Fix fox existing installations Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 51542 [details] [review] Bug 16402: (QA followup) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. I added a followup to ease the task for the RM.
Pushed to master for Koha 16.05. Thanks Jonathan!
Patches pushed to 3.22.x, will be in 3.22.7
I am trying to install Koha on Ubuntu 16.05 and I can't finish the web installer. After the tables are created (and they are), the web installer is stuck with this error: [Warning] Using a password on the command line interface can be insecure. You can't continue to choose the sample data, install the mandatory data etc. Leaving this here for now - if needed I can file a new bug report tomorrow.
(In reply to Katrin Fischer from comment #20) > I am trying to install Koha on Ubuntu 16.05 and I can't finish the web > installer. After the tables are created (and they are), the web installer is > stuck with this error: > > [Warning] Using a password on the command line interface can be insecure. > > You can't continue to choose the sample data, install the mandatory data > etc. > > Leaving this here for now - if needed I can file a new bug report tomorrow. There's a bug filled for that already, it mentions mysql 5.6
bug 13669 doesn't mention the error - was this the one you were thinking about?
(In reply to Katrin Fischer from comment #22) > bug 13669 doesn't mention the error - was this the one you were thinking > about? The first comment explains the failure.