Skip to content

Instantly share code, notes, and snippets.

@diginfo
Last active May 18, 2019 23:20
Show Gist options
  • Save diginfo/27602ad9439660039a1d93280406368b to your computer and use it in GitHub Desktop.
Save diginfo/27602ad9439660039a1d93280406368b to your computer and use it in GitHub Desktop.
Install Maria 10.X.XX on Ubuntu 18
#!/bin/sh
## Install Maria 10.X.XX on Ubuntu 18
## bash <(curl -Ls https://gist.github.com/diginfo/27602ad9439660039a1d93280406368b/raw/)
##
MYVER="10.2.24"
read -p "Enter MYSQL Version ($MYVER): " MYVER
echo "Installing Maria DB Server & Client $MYVER...";
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
rm -rf /etc/apt/sources.list.d/mariadb.list
add-apt-repository "deb [arch=amd64,i386] http://archive.mariadb.org/mariadb-$MYVER/repo/ubuntu/ bionic main"
apt update
apt install -y mariadb-server mariadb-client
mysql_upgrade -u root -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment