xibo_dev_env/db.sh

13 lines
467 B
Bash

export DEBIAN_FRONTEND=noninteractive
wget https://dev.mysql.com/get/mysql-apt-config_0.8.26-1_all.deb
dpkg -i ./mysql-apt-config_0.8.26-1_all.deb
yes | apt-get update
yes | apt-get install mysql-server
mysql -h 'localhost' << EOF
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
CREATE USER 'xibo'@'192.168.56.60' IDENTIFIED BY 'xibo';
CREATE DATABASE xibo_db;
GRANT ALL PRIVILEGES ON xibo_db.* TO 'xibo'@'192.168.56.60' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EOF