4 echo Setting up database
5 mysqladmin -uroot -p$1 create $2
7 mysql -uroot -p$1 $2 < koha.mysql
8 echo creating mysql permissions
9 mysql -uroot -p$1 mysql -e "insert into user (Host,User,Password) values ('localhost','$3',password('$4'))";
10 mysql -uroot -p$1 mysql -e "insert into db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv) values ('%','$2','$3','Y','Y','Y','Y')";
11 mysqladmin -uroot -p$1 reload
13 echo If no errors were reported, the database will be set up
14 echo You can check by typing mysql -u$3 -p$4 $2
15 echo then show tables;
17 echo You will need to Edit C4/Database.pm to reflect the username,database and password you have chosen
20 echo This scripts needs four inputs,
21 echo The root password for mysql, the database for use with koha, the username for use with koha and the password
22 echo For example databaseinstall.sh fish koha kohauser tuna