Last active
May 27, 2019 03:35
-
-
Save hoangdh/da812aa326c5f62f9b771821d4177755 to your computer and use it in GitHub Desktop.
Quick install MariaDB 10.3 on CentOS 7.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat > /etc/yum.repos.d/mariadb.repo << EOF | |
[mariadb] | |
name = MariaDB | |
baseurl = http://yum.mariadb.org/10.3/centos73-amd64/ | |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | |
gpgcheck=1 | |
EOF | |
yum install MariaDB-server MariaDB-client -y | |
systemctl start mariadb | |
systemctl enable mariadb | |
### Remove test's db; user and set password root | |
mysql -uroot -e "DROP DATABASE test;" | |
mysql -e "DELETE FROM mysql.user WHERE user LIKE '';" | |
mysql -e "FLUSH PRIVILEGES;" | |
clear | |
echo "Please reset password root user mysql's!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment