[Koha-devel] Re: [Koha] Re: OpenSolaris and kohaadmin rights at installation

Chris Cormack crc at liblime.com
Sun Jun 24 11:46:38 CEST 2007


On 22/06/2007, at 1:01 AM, Thommy M. wrote:

>
> Nope, exactly the same error from what I see...
>
> Creating the MySQL database for Koha...
>
> ERROR 1045 (28000): Access denied for user  
> 'kohaadmin'@'localhost' (using password: YES)
>
> DBI connect('Koha:localhost','kohaadmin',...) failed: Access denied  
> for user 'kohaadmin'@'localhost' (using password: YES) at /usr/ 
> local/koha/intranet/modules/C4/Context.pm line 411
> Can't call method "prepare" on an undefined value at scripts/ 
> updater/updatedatabase line 1553.
> Problem updating database...
> root at schumi:/opt/local/src/koha-2.2.8#
>
>
> Did this before running the new install:
>
> mysqladmin -f -uroot -p drop Koha
> mysql -uroot -p -Dmysql -e"delete from user where user='kohaadmin'"
> mysql -uroot -p -Dmysql -e"delete from db where user='kohaadmin'"
> mysqladmin -uroot -p reload
>
>
Shifting this to the devel list as it seems a better place to talk  
about it.

I think I have round the problem, heres what happens
essentially the installer runs
mysql -uroot -e "GRANT ALL PRIVILEGES on Koha2.* to 'kohaadmin2'  
Identified by 'fish'"

Then it tries to use that user .. this worked with MySQL 4 .. but  
with MySQL 5 we need

mysql -uroot -e "GRANT ALL PRIVILEGES on Koha2.* to  
'kohaadmin2'@'localhost' Identified by 'fish'"

If someone who is running MySQL 4 could try the above statement and  
make sure it works fine with 4 ... i'll update the installer, if it  
doesnt, Ill update it to do a version check and then run the  
appropriate grant line.

If I dont hear back by morning 7 time (about 11 hours), Ill get a  
version 4 up and running so I can test.

For the people who want to install 2.2.9 with MySQL 5 you can edit  
line 1803 in Install.pm, to add the @'localhost' bit ie
         system("$mysqldir/bin/mysql '-u$mysqluser' -e \"GRANT ALL  
PRIVILEGES on ".$database.".* to '$user' IDENTIFIED BY '$pass' \"  
mysql");
becomes
         system("$mysqldir/bin/mysql '-u$mysqluser' -e \"GRANT ALL  
PRIVILEGES on ".$database.".* to '$user'\@'localhost' IDENTIFIED BY  
'$pass' \" mysql");


Hope this helps

Chris
--
Chris Cormack                            chris.cormack at liblime.com
VP Research and Development                        www.liblime.com
LibLime                                             +64 21 542 131







More information about the Koha-devel mailing list