Skip to content
Snippets Groups Projects
Commit f8a675fb authored by Sebastian Rieger's avatar Sebastian Rieger
Browse files

changed from mysql to mariadb to fix privilege probs

parent 05d363ca
No related branches found
No related tags found
No related merge requests found
...@@ -84,11 +84,11 @@ if [[ -e /etc/os-release ]]; then ...@@ -84,11 +84,11 @@ if [[ -e /etc/os-release ]]; then
if [[ $INSTALL_DATABASE -eq 1 ]]; then if [[ $INSTALL_DATABASE -eq 1 ]]; then
if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server python3-mysqldb sudo DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server python3-mysqldb
# HSFD changes for Ubuntu 18.04 # HSFD changes for Ubuntu 18.04
sudo sed -i -e "/bind-address/d" /etc/mysql/mysql.conf.d/mysqld.cnf #sudo sed -i -e "/bind-address/d" /etc/mysql/mysql.conf.d/mysqld.cnf
#sudo sed -i -e "/bind-address/d" /etc/mysql/my.cnf ##sudo sed -i -e "/bind-address/d" /etc/mysql/my.cnf
sudo service mysql restart sudo systemctl restart mariadb
elif [[ $ID = 'fedora' ]]; then elif [[ $ID = 'fedora' ]]; then
# fedora currently not tested nor supported # fedora currently not tested nor supported
sudo dnf install -y mariadb-server python3-mysql sudo dnf install -y mariadb-server python3-mysql
...@@ -99,7 +99,7 @@ if [[ -e /etc/os-release ]]; then ...@@ -99,7 +99,7 @@ if [[ -e /etc/os-release ]]; then
echo "error: distribution $ID not supported" echo "error: distribution $ID not supported"
exit 1 exit 1
fi fi
sudo mysqladmin password password sudo mariadb-admin password password
sudo mysql -uroot -ppassword mysql -e "CREATE DATABASE IF NOT EXISTS faafo; GRANT ALL PRIVILEGES ON faafo.* TO 'faafo'@'%' IDENTIFIED BY 'password';" sudo mysql -uroot -ppassword mysql -e "CREATE DATABASE IF NOT EXISTS faafo; GRANT ALL PRIVILEGES ON faafo.* TO 'faafo'@'%' IDENTIFIED BY 'password';"
URL_DATABASE='mysql://root:password@localhost/faafo' URL_DATABASE='mysql://root:password@localhost/faafo'
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment