#!/bin/bash BASEURL=http://ukr.pw dnf install mariadb1011-server service mariadb stop rm -f /etc/my.cnf wget -O /etc/my.cnf $BASEURL/ub/my.cnf.maria.txt rm -rf /var/lib/mysql/* mysql_install_db service mariadb start systemctl enable mariadb.service 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