Install Koha 3.6 on Debian squeeze using a separate MySQL server

From Koha Wiki

Jump to: navigation, search
Home > Documentation
Home > Documentation > Installation
Home > Documentation > Installation > Debian Packages
Home > Documentation > Installation > Installation alternatives
Home > Koha Versions
Home > Koha Versions > 3.6
Koha > Technical > Administration
Koha > Technical > Administration
Koha > Technical > Administration

Most of the instructions in Koha 3.6 on Debian Squeeze assume a local MySQL database server. If you intend to use an external or separate database server, it is important that you don't run koha-create --create-db mylibrary. Instead, use the following steps:

  • koha-create --request-db mylibrary

Example output:

root@web:~# koha-create --request-db mylibrary
See mylibrary-db-request.txt for database creation request.
Please forward it to the right person, and then run
/usr/sbin/koha-create --populate-db mylibrary
Thanks.
Restarting web server: apache2 ... waiting .

  • Show database request:
root@web:~# cat mylibrary-db-request.txt
Please create a MySQL database and user on mysql as follows:

database name: koha_mylibrary
database user: koha_mylibrary
     password: somerandomstring

Thank you.

  • Create MySQL database and set privileges. Use the database name, user name, and password specified in mylibrary-db-request.txt:
ssh root@db
# (Enter login credentials, if necessary.)
root@db:~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 20353
Server version: 5.1.49-3 (Debian)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database koha_mylibrary;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on koha_mylibrary.* to 'koha_mylibrary'@'web.my.domain' identified by 'somerandomstring';
Query OK, 0 rows affected (0.17 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.12 sec)

mysql> exit
Bye
root@db:~# 
  • Populate the database:
root@web:~# koha-create --populate-db mylibrary
Koha instance is empty, no staff user created.
Enabling site mylibrary.
Run '/etc/init.d/apache2 reload' to activate new configuration!
Restarting web server: apache2 ... waiting .
Starting Zebra server for mylibrary
root@web:~#

Background

Installing_Multiple_Instances_of_Koha#Koha_on_a_remote_DB has some relevant info, but if your database server is set up as per MySQL best practices (i.e. non-local root logins disabled), the instructions there will not work.

Personal tools