File create_mysqldb.sh of Package icinga-web

#!/bin/bash
mysql -u root -p <<EOF
CREATE DATABASE icinga_web;
GRANT USAGE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'icinga_web' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON icinga_web.* TO 'icinga_web'@'localhost';
FLUSH PRIVILEGES;
USE icinga_web;
`cat /usr/share/icinga-web/etc/schema/mysql.sql`
quit
EOF