Lines 72-79
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 |
75 |
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof || true |
76 |
DROP USER IF EXISTS '$mysqluser'; |
76 |
DROP USER '$mysqluser'; |
|
|
77 |
eof |
78 |
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf << eof || true |
77 |
CREATE USER '$mysqluser' IDENTIFIED BY '$mysqlpwd'; |
79 |
CREATE USER '$mysqluser' IDENTIFIED BY '$mysqlpwd'; |
78 |
GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser'; |
80 |
GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser'; |
79 |
FLUSH PRIVILEGES; |
81 |
FLUSH PRIVILEGES; |