[Koha] issue between koha 2.5 and mysql 5.0

Dana Huff dana at sefovan.org
Wed Aug 30 00:06:29 NZST 2006

Hello Partha,

There are indeed several issues with running Koha on MySQL 5.0 and not just
with Windows so I’m posting this on the Koha general list also.

First, to log in to Koha you need to make some changes to your MySQL
authentication. With the default installation you will get something like:

>> DBI connect('mycomputer:localhost','koha',...) failed: Client does not
>> authentication protocolrequested by server; consider upgrading MySQL
client at 
>> C:\usr\koha225\modules/C4/Context.pm line 409.

You can overcome the problem by editing line 1808 of Install.pm from:
print system("$mysqldir/bin/mysql -u$mysqluser -e \"insert into user
(Host,User,Password) values
('$hostname','$user',password('$pass'))\" mysql\;"); 
print system("$mysqldir/bin/mysql -u$mysqluser -e \"insert into user
(Host,User,Password) values
('$hostname','$user',OLD_PASSWORD('$pass'))\" mysql\;");

(Thanks to Andrew Koebrick (Andrew.Koebrick at state.mn.us) for that solution.)

Or, of course, you can execute the mysql command manually to do the same
thing if you don’t use the install script and which you probably didn’t do
to install Koha on Windows; anyway, that is what I did. 

Then there is a new reserved word in MySQL 5 – “return” which is used as a
field name in the issues table in Koha. So in any place that is referenced
it must be enclosed in single quotes, or back-quotes. I haven’t found an
instance of that in the Koha modules or scripts but I’m still looking. It
will be an issue if you write any of your own sql scripts for ad-hoc

Finally, there are a couple of modules that must be modified because of
changes in the SQL syntax rules with MySQL 5. Theses are in

      on additionalauthors.biblionumber =biblio.biblionumber
      on (additionalauthors.biblionumber =biblio.biblionumber)
<                                                           left join
itemtypes on biblioitems.itemtype = itemtypes.itemtype
>                                                           left join
itemtypes on (biblioitems.itemtype = itemtypes.itemtype)
                  from biblio, biblioitems
                  from biblioitems, biblio
                  biblio.biblionumber = bibliosubtitle.biblionumber
                  left join itemtypes on
                  (biblio.biblionumber = bibliosubtitle.biblionumber)
                  left join (itemtypes on

      FROM biblio, marc_biblio 
      LEFT JOIN biblioitems on biblio.biblionumber =
      LEFT JOIN itemtypes on itemtypes.itemtype=biblioitems.itemtype
      FROM marc_biblio, biblio
      LEFT JOIN biblioitems on (biblio.biblionumber =
      LEFT JOIN itemtypes on (itemtypes.itemtype=biblioitems.itemtype)

That seems to have taken care of my problems with Koha 2.2.5 and MySQL 5.0. 

Dana Huff
Madrid, Spain
dana at sefovan.org

From: koha-win32-bounces+dana=sefovan.org at nongnu.org
[mailto:koha-win32-bounces+dana=sefovan.org at nongnu.org] On Behalf Of P. S.
Sent: Tuesday, August 29, 2006 8:18 AM
To: Koha-win32 at nongnu.org
Subject: Re: [Koha-win32] need help

Hello friends,
Is any one of us using MySQL 5.0 as backend RDBMS for Koha on Windows? I'm
running it through MySQL 3.23.58 but facing problems with MySQL 5.x. What is
the problem? Pl. suggest.
DLISc, Vidyasagar University

More information about the Koha mailing list