#
# creat table 
# use ambari;
# source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;
#
mkdir -p /mnt/data/mysql/data
mkdir -p /mnt/data/mysql/log
curl -o /mnt/data/mysql/docker-compose.yml http://repo.mingames.cn/config/docker-compose.yml
curl -o /mnt/data/mysql/my.cnf http://repo.mingames.cn/config/my.cnf
curl -o /usr/share/java/mysql-connector-java.jar http://repo.mingames.cn/tools/mysql-connector-java-8.0.30.jar
cp /usr/share/java/mysql-connector-java.jar /var/lib/ambari-server/resources/mysql-jdbc-driver.jar
echo "server.jdbc.driver.path=/usr/share/java/mysql-connector-java.jar" >> /etc/ambari-server/conf/ambari.properties
cd /mnt/data/mysql
yum install -y mariadb
docker-compose up -d
