[Koha] MySQL problem

Ricardo Dias Marques lists at ricmarques.net
Sat Jun 21 01:04:03 NZST 2008


Hi Michael,

On Fri, Jun 20, 2008 at 1:08 PM, Michael Sauers <msauers at nlc.state.ne.us> wrote:

> Ok, next question. I recall creating a root password for MySQL after
> installing it but these instructions say to not log in as root. So, as far
> as I know I've not yet created any MySQL users/passwords. I'm assuming I
> need to do this first…?
>
> Sorry for the noob questions but this is a giant experiment to see how easy
> (or not) this is for someone of extensive Windows experience and
> beginner-level Linux experience (i.e. Me) so we can tell our librarians
> across the state how "easy" it is to install.

Given that you mention "beginner-level Linux experience", I'm assuming
that you're trying to install Koha in a Linux distribution. What
version of Koha are you trying to install? What Linux distribution are
you using?

Your assumption is correct: you should create a non-root MySQL user
for Koha. The way of doing that is described, for example, in the
INSTALL.debian file of the Koha distribution, that is also available
online (for the current Koha 3 snapshot version) at:

http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=blob;f=INSTALL.debian


The relevant section of that INSTALL.debian file, for this problem, is
section "2.2 Create the Koha database":

____________________

2.2 Create the Koha database

Create the database and user with associated privileges:

$ mysqladmin -uroot -p<password> create <kohadatabasename>

$ mysql -uroot -p<password>

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22

Server version: 5.0.32-Debian_7etch3-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all on <kohadatabasename>.* to
'<kohadatabaseuser>'@'localhost' identified by
'<kohadatabaseuserpassword>';
Query OK, 0 rows affected (0.00 sec)

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

mysql> quit
____________________


You should replace <kohadatabasename> above by the name of your koha
database (usually "koha", without the quotes), <kohadataseuser> by the
name of the MySQL user that you want to create (usually "kohaadmin",
also without the quotes) and <kohadatabaseuserpassword> by the
password that you want to assign to that user. The "grant all" command
above creates the specified MySQL user.

I hope this helps you.


Best wishes,
Ricardo Dias Marques
lists AT ricmarques DOT net


More information about the Koha mailing list