OpenSolaris and kohaadmin rights at installation
I've done a Koha setup on Opensolaris (snv_65) with Koha 2.2.9. After some fiddling with the prerequisites I finally came to # perl installer.pl Everyting seems to go smooth until kohaadmin wants to use the database. ............... 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@schumi:/opt/local/src/koha-2.2.9# ................ Looks like there are some credentials for kohaadmin that are not set correctly by the install.pl script. Any hints??? Cheers, /Thommy M. Here's the whole listing... # perl installer.pl WELCOME TO THE KOHA INSTALLER This program will ask some questions and try to install koha for you. You need to know: where most koha files should be stored (you can set the prefix environment variable for this); the username and password of a mysql superuser; and details of your library setup. You may also need to know details of your Apache setup. If you want to install the Koha configuration files somewhere other than /etc (for installing not as root, or to have many Kohas on one system, for example), you should set the etcdir environment variable. Please look at your manuals for details of how to set that. Recommended answers are given in brackets after each question. To accept the default value for any question (indicated by []), simply hit Enter at the prompt. Note that you also can define an auto_install_file, that will answer every question automatically. To use this feature, run ./installer.pl -i /path/to/auto_install_file Are you ready to begin the installation? ([Y]/N): Great! Continuing... PERL MODULES Checking perl modules ... Subroutine PDF::API2::Resource::Font::Postscript::O_RDONLY redefined at /usr/perl5/5.8.4/lib/Exporter.pm line 65. at /usr/perl5/site_perl/5.8.4/PDF/API2/Resource/Font/Postscript.pm line 46 PERL MODULES AVAILABLE All required perl modules are installed. Press <ENTER> to continue: OPAC DIRECTORY Please supply the directory you want Koha to store its OPAC files in. This directory will be auto-created for you if it doesn't exist. OPAC Directory [/usr/local/koha/opac]: LIBRARIAN DIRECTORY Please supply the directory you want Koha to store its Librarian interface files in. This directory will be auto-created for you if it doesn't exist. Intranet Directory [/usr/local/koha/intranet]: LOG DIRECTORY Specify a directory where log files will be written. Koha Log Directory [/usr/local/koha/log]: DATABASE NAME Please provide the name that you wish to give your koha database. It must not exist already on the database server. Most users give a short single-word name for their library here. Database name [Koha]: DATABASE HOST Please provide the mysql server name. Unless the database is stored on another machine, this should be "localhost". Database host [localhost]: DATABASE USER We are going to create a new mysql user for Koha. This user will have full administrative rights to the database called Koha when they connect from localhost. This is also the name of the Koha librarian superuser. Most users give a single-word name here. Database user [kohaadmin]: DATABASE PASSWORD Please provide a good password for the user kohaadmin. IMPORTANT: You can log in using this user and password at any time. Password for database user kohaadmin: kohaadmin Use of uninitialized value in concatenation (.) or string at Install.pm line 1358, <STDIN> line 9. APACHE CONFIGURATION Koha needs to write an Apache configuration file for the OPAC and Librarian sites. By default this installer will do this by using one name and two different ports for the virtual hosts. There are other ways to set this up, and the installer will leave comments in /etc/koha-httpd.conf about them. NOTE: You will need to add lines to your main httpd.conf to include /etc/koha-httpd.conf (using the Include directive) and to make sure it is listening on the right ports and host names (using the Listen directive). Press <ENTER> to continue: WEB E-MAIL CONTACT Enter the e-mail address to be used as a contact for Koha. This address is displayed if fatal errors are encountered. E-mail contact [webmaster@]: thommym@at-hardeberga.com WEB HOST NAME OR IP ADDRESS Please enter the host name or IP address that you wish to use for koha. Normally, this should be a name or IP that belongs to this machine. Host name or IP Address [schumi]: OPAC PORT Please enter the port for your OPAC interface. This defaults to port 80, but if you are already serving web content with this hostname, you should change it to a different port (8000 might be a good choice, but check any firewalls). Enter the OPAC Port [80]: LIBRARIAN PORT Please enter the port for your Librarian interface. This must be different from the OPAC port (80). Enter the Intranet Port [8080]: UPDATING APACHE CONFIGURATION Checking for modules that need to be loaded... INSTALLING FILES Copying files to installation directories:Copying admin templates to /usr/local/koha/intranet/htdocs. Copying admin interface to /usr/local/koha/intranet/cgi-bin. Copying main scripts to /usr/local/koha/intranet/scripts. Copying perl modules to /usr/local/koha/intranet/modules. Copying OPAC templates to /usr/local/koha/opac/htdocs. Copying OPAC interface to /usr/local/koha/opac/cgi-bin. MYSQL LOCATION Koha can't find the MySQL command-line tools. If you installed a MySQL package, you may need to install an additional package containing mysqladmin. If you compiled mysql yourself, please give the value of --prefix when you ran configure. The file mysqladmin should be in bin/mysqladmin under the directory that you give here. MySQL installation directory: /opt/csw/mysql4 MYSQL ROOT USER PASSWORD To create the koha database, please enter your mysql server's root user password: Password: mysqladmin CREATING DATABASE 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@schumi:/opt/local/src/koha-2.2.9#
I've done a Koha setup on Opensolaris (snv_65) with Koha 2.2.9. After some fiddling with the prerequisites I finally came to
# perl installer.pl
Everyting seems to go smooth until kohaadmin wants to use the database.
............... 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@schumi:/opt/local/src/koha-2.2.9# ................
Looks like there are some credentials for kohaadmin that are not set correctly by the install.pl script. Any hints??? I've seen this posted a few times w/respect to 2.2.9, so I suspect something's up. Could you try installing 2.2.8 and see if the same
----- "Thommy M." <thommym@at-hardeberga.com> wrote: problem occurs? That will help us narrow down the problem. Anyone else who's already figured out what the problem is caused by and has a solution? Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
Joshua M. Ferraro wrote:
I've done a Koha setup on Opensolaris (snv_65) with Koha 2.2.9. After some fiddling with the prerequisites I finally came to
# perl installer.pl
Everyting seems to go smooth until kohaadmin wants to use the database.
............... 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@schumi:/opt/local/src/koha-2.2.9# ................
Looks like there are some credentials for kohaadmin that are not set correctly by the install.pl script. Any hints??? I've seen this posted a few times w/respect to 2.2.9, so I suspect something's up. Could you try installing 2.2.8 and see if the same
----- "Thommy M." <thommym@at-hardeberga.com> wrote: problem occurs? That will help us narrow down the problem.
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@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
I believe I had a similar problem before I deleted the MySQL anonymous accounts. http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html Let us know if that helps at all, Mike D. -----Original Message----- From: koha-bounces@lists.katipo.co.nz [mailto:koha-bounces@lists.katipo.co.nz]On Behalf Of Thommy M. Sent: June 21, 2007 9:02 AM To: koha@lists.katipo.co.nz Subject: [Koha] Re: OpenSolaris and kohaadmin rights at installation Joshua M. Ferraro wrote:
I've done a Koha setup on Opensolaris (snv_65) with Koha 2.2.9. After some fiddling with the prerequisites I finally came to
# perl installer.pl
Everyting seems to go smooth until kohaadmin wants to use the database.
............... 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@schumi:/opt/local/src/koha-2.2.9# ................
Looks like there are some credentials for kohaadmin that are not set correctly by the install.pl script. Any hints??? I've seen this posted a few times w/respect to 2.2.9, so I suspect something's up. Could you try installing 2.2.8 and see if the same
----- "Thommy M." <thommym@at-hardeberga.com> wrote: problem occurs? That will help us narrow down the problem.
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@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 _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
----- "Thommy M." <thommym@at-hardeberga.com> wrote:
Joshua M. Ferraro wrote:
----- "Thommy M." <thommym@at-hardeberga.com> wrote:
I've done a Koha setup on Opensolaris (snv_65) with Koha 2.2.9. After some fiddling with the prerequisites I finally came to
# perl installer.pl
Everyting seems to go smooth until kohaadmin wants to use the database.
............... 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@schumi:/opt/local/src/koha-2.2.9# ................
Looks like there are some credentials for kohaadmin that are not set correctly by the install.pl script. Any hints??? I've seen this posted a few times w/respect to 2.2.9, so I suspect something's up. Could you try installing 2.2.8 and see if the same problem occurs? That will help us narrow down the problem.
Nope, exactly the same error from what I see... Bummer ...
Well I've asked Chris to take a look at this for the next Koha Day (on Sunday) so hopefully it's something reproducible that can be patched easily ... so hang tight. Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
Hi All 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@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
Ive fixed this in cvs now, in the rel_2_2 branch. So if you grab the Install.pm file from cvs you will get the fix. Otherwise, the change is line 1083 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@liblime.com VP Research and Development www.liblime.com LibLime +64 21 542 131
Chris Cormack wrote:
Ive fixed this in cvs now, in the rel_2_2 branch. So if you grab the Install.pm file from cvs you will get the fix.
Otherwise, the change is line 1083 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");
Chris, IIRC, when I specify a host different from 'localhost' for the MySQL configuration during install.pl, the install fails. This is because 'localhost' is hardcoded in various parts of the install. See http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1323 for details. Might I suggest that @'localhost' be replaced by @'$installhost' in the above, so that it works with any server configured for MySQ, not just localhost. cheers rickw -- _________________________________ Rick Welykochy || Praxis Services Any belief that can't stand up to objective scrutiny is hardly worth having. -- LJ McIntyre
participants (5)
-
Chris Cormack -
Joshua M. Ferraro -
Mike Dalgity -
Rick Welykochy -
Thommy M.