|
Lines 72-81
mysqldb="koha_$name"
Link Here
|
| 72 |
mysqluser="koha_$name" |
72 |
mysqluser="koha_$name" |
| 73 |
mysqlpwd="$( xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/$name/koha-conf.xml )" |
73 |
mysqlpwd="$( xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/$name/koha-conf.xml )" |
| 74 |
zcat "$sqldump" | mysql --defaults-extra-file=/etc/mysql/koha-common.cnf |
74 |
zcat "$sqldump" | mysql --defaults-extra-file=/etc/mysql/koha-common.cnf |
| 75 |
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof || true |
75 |
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof |
| 76 |
DROP USER '$mysqluser'; |
76 |
DROP USER IF EXISTS '$mysqluser'; |
| 77 |
eof |
|
|
| 78 |
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf << eof || true |
| 79 |
CREATE USER '$mysqluser' IDENTIFIED BY '$mysqlpwd'; |
77 |
CREATE USER '$mysqluser' IDENTIFIED BY '$mysqlpwd'; |
| 80 |
GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser'; |
78 |
GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser'; |
| 81 |
FLUSH PRIVILEGES; |
79 |
FLUSH PRIVILEGES; |
| 82 |
- |
|
|