#!/bin/bash -x BASEURL=https://ukr.pw export DEBIAN_FRONTEND=noninteractive apt-get update apt-get -y install gnupg echo 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.9/ubuntu focal main' >> /etc/apt/sources.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xF1656F24C74CD1D8 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