mempool: drop database if exists (#1960)

This commit is contained in:
Christoph Stenglein
2021-03-18 20:23:55 +00:00
committed by GitHub
parent 6f5a6b1e7e
commit 6bce550ea7

View File

@@ -125,7 +125,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
#echo "# try to suppress question on statistics report .."
#sudo sed -i "s/^}/,\"cli\": {\"analytics\": false}}/g" /home/mempool/mempool/frontend/angular.json
sudo mariadb -e "DROP DATABASE mempool;"
sudo mariadb -e "DROP DATABASE IF EXISTS mempool;"
sudo mariadb -e "CREATE DATABASE mempool;"
sudo mariadb -e "GRANT ALL PRIVILEGES ON mempool.* TO 'mempool' IDENTIFIED BY 'mempool';"
sudo mariadb -e "FLUSH PRIVILEGES;"