RE: [Koha] yet another installer problem
Hi Roger I'll try to give you a few pointers hope at time though... Original Message
From: Roger Horne <roger@hrothgar.co.uk> To: koha@lists.katipo.co.nz Subject: [Koha] yet another installer problem Date: Sat, 5 Feb 2005 18:46:33 +0000 (GMT)
Creating the Mysql database ...
ERROR 1062 at line 1: Duplicate entry 'localhost-kohaadmin' for key 1 256 ERROR 1062 at line 1: Duplicate entry '%-Koha-kohaadmin' for key 1
--- This error points that you have allready a user called "kohaadmin" set as default in a Koha ./installer.pl installation. You can remove it by entering to the Mysql console and typing DELETE FROM mysql.user WHERE User = "kohaadmin"; You may also would want to check first if the user is actually in the DB, can do it by: SELECT user, host, password FROM mysql.user; By this you'll get a table with all the info about users, etc.
/usr/bin/mysqladmin: command to server at 'localhost' failed error 'access denied for user: kohaadmin@localhost' (using password 'YES')'
ERROR CREATING Database Could not connect to Mysql server
About this, you only should check your password spelling, may be you are entering with a different one. You allways should try entering with: # mysql -u root -p[urpass] ----> without the brackets Ok may be you know all this by now, hope could help and someone correct me if I'm wrong. You may also want to check www.kohadocs.org for further documentation about a debian based installation. cheers J0se _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
On Sun 06 Feb, zero@vtr.net wrote:
ERROR 1062 at line 1: Duplicate entry 'localhost-kohaadmin' for key 1 256 ERROR 1062 at line 1: Duplicate entry '%-Koha-kohaadmin' for key 1
--- This error points that you have allready a user called "kohaadmin" set as default in a Koha ./installer.pl installation.
You can remove it by entering to the Mysql console and typing
DELETE FROM mysql.user WHERE User = "kohaadmin";
You may also would want to check first if the user is actually in the DB, can do it by:
[snip] I am afraid that this is not the problem. I get the error constantly no matter what state Mysql is in. I have deleted all reference to koha from mysql using your suggestions and also checking every mysql file. And I have tried changing the mysql root pw to eg one that contains no numbers. And have tried even enclosing it in quotes. And the pw works if I type at the main system prompt mysql -p then my pw, but installer.pl refuses to accept it. Yes, the mysql user and db tables will get references to kohaadmin in them, This appears to be acheived by install.pm: print system("$mysqldir/bin/mysql -u$mysqluser mysql -e \"insert into user (Host,User,Password) values ('$hostname','$user',password('$pass'))\"\;");#" system("$mysqldir/bin/mysql -u$mysqluser mysql -e \"insert into db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv, index_priv, alter_priv) values ('%','$database','$user','Y','Y','Y','Y','Y','Y','Y','Y')\""); It seems that this is done without using the mysql root pw. Or alternatively that that pw gets lost somewhere in the installer after these lines but before the koha database is created. ie these lines cause kohaadmin to be entered in the mysql.db and mysql.user tables but the koha db is not created. The db should be created bt the following lines which are: # Change to admin user login setmysqlclipass($pass); my $result=system("$mysqldir/bin/mysqladmin", "-u$user", "create", "$database"); if ($result) { showmessage(getmessage('CreatingDatabaseError'),'PressEnter', '', 1); } else { # Create the database structure startsysout(); system("$mysqldir/bin/mysql -u$user $database < koha.mysql"); } I have tried doctoring install.pm by changing the line setmysqlclipass($pass); by substituting "mypw" for $pass but it doesn't work.
About this, you only should check your password spelling, may be you are entering with a different one.
I have changed the root pw to about the most simplest I could use. So I think it unlikely I have got it wrong. Thanks. Roger -- Roger Horne, 11 New Square, Lincoln's Inn, London WC2A 3QB mailto:roger@hrothgar.co.uk
On Sun 06 Feb, Roger Horne (ie I) wrote:
I am afraid that this is not the problem. I get the error constantly no matter what state Mysql is in.
I have done this: 1. mysql -p password: mypassword [success] 2. Delete every reference to kohaadmin from all mysql files. (Show databases shows mysql and test only.) 3. Delete the koha directory installed on the last attempt. 4. Delete the untarred kaha-2.2.0 directory 5. Follow the instructions for 2.2.0, ie untar, change to the koha* directory and run ./installer.pl 6. Answer all the questions, using defaults and filling in the blanks with appropriate details. The mysql root password is entered correctly. 7. The installer croaks as before. The result is that mysql.db and mysql.user have details for kohaadmin entered in them (which were not there before and which presumably required the installer to use the root mysql password) but the koha db has not been created. Which suggests to me that either installer/pl does not like debian or that permissions are wrong somewhere. As I said I am trying to install on a remote machine (using ssh) and the default owner and user are unusual. But /.installer.pl runs without complaint. Is there any way that I can doctor installer.pl/install.pm by substituting fixed names etc for the existing variables? Roger -- Roger Horne, 11 New Square, Lincoln's Inn, London WC2A 3QB mailto:roger@hrothgar.co.uk
My recent experience of installing Koha 2.2.0 Here some problem I encounter with Koha installer.pl: - Some error when I run the script a second time: + remove the mysql user from all table in mysql database (not just in user, also in db) It's remove error message in display... + remove de Koha database too if it has been created previously (The biggest pb:) - The syntax of my mysql seem to be different: (mysql Ver 11.18 Distrib 3.23.57, for sun-solaris2.9 (sparc)) In Install.pm, the different calls to Mysql put the database argument NOT at the last place in the command line... Mysql complain... eg: -u user -e cmd and last: database!!! # Maybe not this time... - In my mysqladmin call: argument -u is next of $user (I need a space between!). Some other problem arise because a do not install as root, but harmless. So after some bad install... that's go and works! (Not tested: YAZ and Z3950) Hope that's help. -- Bruno Marmol. Ingénieur à la Direction Information Scientifique et de la communication Email: Bruno.Marmol@Inrialpes.Fr - Tel: 04 76 61 53 04 - Fax: 04 76 61 52 52 Inria Rhône Alpes. ZIRST - 655 Av de l'Europe. - Montbonnot St Martin 38334 St Ismier Cedex - France
Roger Horne wrote:
On Sun 06 Feb, Roger Horne (ie I) wrote:
I am afraid that this is not the problem. I get the error constantly no matter what state Mysql is in.
I have done this:
1. mysql -p password: mypassword [success] 2. Delete every reference to kohaadmin from all mysql files. (Show databases shows mysql and test only.) 3. Delete the koha directory installed on the last attempt. 4. Delete the untarred kaha-2.2.0 directory 5. Follow the instructions for 2.2.0, ie untar, change to the koha* directory and run ./installer.pl 6. Answer all the questions, using defaults and filling in the blanks with appropriate details. The mysql root password is entered correctly. 7. The installer croaks as before.
From Section 2.9.3 of the MySql Reference Manual: To use SET PASSWORD on Windows, do this: shell> mysql -u root mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd'); mysql> SET PASSWORD FOR ''@'%' = PASSWORD('newpwd'); To use SET PASSWORD on Unix, do this: shell> mysql -u root mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd'); mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd'); For reasons I wish I understood, sometimes a connection to the database will appear to come from "user@localhost", other times it will appear to come from "user@hostname". If you set one but not the other, connection may fail. If you set both of these, you will get in. Note that this applies to user "root", user "mysql", user "koha", and everyone else. Hope this helps. -- John S. Caywood, email jscaywood@cox.net
participants (4)
-
Bruno Marmol -
John Caywood -
Roger Horne -
zero@vtr.net