Try to keep mariadb running

This commit is contained in:
Bob Mottram 2017-06-11 10:17:45 +01:00
parent 88083cc184
commit 5cf9fdd93e
1 changed files with 4 additions and 0 deletions

View File

@ -177,6 +177,10 @@ function install_mariadb {
systemctl daemon-reload
systemctl restart mariadb
# mariadb daemon seems to occasionally crash
# This is a crude attempt to keep it running
add_watchdog_daemon mariadb
run_query mysql "CREATE USER 'root@localhost' IDENTIFIED BY '${MARIADB_PASSWORD}'; flush privileges;"
run_query mysql "update mysql.user set plugin = '' where User='root@localhost'; flush privileges;"
run_query mysql "GRANT ALL PRIVILEGES ON * TO 'root@localhost'; flush privileges;"