[Koha] Upgrade problem Debian Packages

Liz Rea liz at catalyst.net.nz
Mon Jan 15 12:12:55 NZDT 2018



On 15/01/18 11:55, clint.deckard wrote:
> Following an upgrade form 16.05 to 17.11 using the packages (and
> koha-restore) on Debian Jessie I get the following error when trying
> to access the staff or opac interface;
> "DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed:
> Access denied for user 'koha_instance'@'localhost' (using password:
> YES) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1490. at
> /usr/share/koha/lib/Koha/Database.pm line 100"
>
> I did notice the error during koha-restore 'DROP USER koha_instance
> failed' (approx).
>
> I'd appreciate some help.
>
> Clint.
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
Hi Clint,

Did the instance koha_instance exist before you tried to restore the
database? i.e. did you koha-create instance before or after you restored
the database?

Is the instance name the same between your dumped database and the new
instance? If not, they probably should be. If you can't do that for some
reason, you'll need to unzip and edit the database dump to include the
new db name, it'll look something like:

--
-- Current Database: `koha_instance`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `koha_instance` /*!40100
DEFAULT CHARACTER SET latin1 */;

USE `koha_instance`;

if "instance" there doesn't match the name of your new db/instance,
you'll need to edit the dump to change it to match up, if that makes sense.

I'm making a grand assumption that you know that most Koha instances
aren't named instance, they can be named whatever you want and that
there's nothing magic about "instance" as a name when you've done
koha-create, or koha_instance as the database name. All that needs to
happen is that the koha-create <instance> and koha_<instance> should
match up. Then everything should work. And that the <instance> should
exist before you try to import the database.

If koha-restore doesn't work after you've unzipped and edited the dump
file, you can do (I'm assuming you'll have only one dump file in the
current directory - if you have more than one specify the full filename!)

cat instance-*.sql | sudo koha-mysql instance

and that will import the edited database into the instance's database.

Cheers,
Liz





-- 
--
Liz Rea
Catalyst.Net Limited
Level 6, Catalyst House, 
150 Willis Street, Wellington.
P.O Box 11053, Manners Street, 
Wellington 6142
04 803 2265

GPG: B149 A443 6B01 7386 C2C7 F481 B6c2 A49D 3726 38B7




More information about the Koha mailing list