#!/bin/bash -x # Repo URL taken from https://www.linuxcapable.com/how-to-install-mariadb-on-ubuntu-linux/ BASEURL=https://ukr.pw export DEBIAN_FRONTEND=noninteractive apt-get update apt-get -y install mariadb-server service mysql stop rm -f /etc/mysql/my.cnf wget -O /etc/mysql/my.cnf $BASEURL/ub/my.cnf.1G.txt rm -rf /var/lib/mysql/* mysql_install_db service mysql start if [ ! -x /bin/gp ]; then wget -O /bin/gp $BASEURL/gp.txt chmod 755 /bin/gp fi MSLRTPW=`gp 16` wget -O - $BASEURL/mysql/setpw.mariadb105.txt | sed -e "s/PWPWPW/$MSLRTPW/" | mysql mysql echo echo echo "MySQL root password is $MSLRTPW" echo echo echo $MSLRTPW > /root/.pass.my echo echo "[client]" > /root/.my.cnf echo "user=root" >> /root/.my.cnf echo "password=$MSLRTPW" >> /root/.my.cnf