安裝
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo apt-get update
sudo apt-get install mariadb-server
配置
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
安全設置
刪除匿名用戶
Remove anonymous users? [Y/n] Y
不允許root遠程登錄
Disallow root login remotely? [Y/n] Y
刪除測試數據庫並訪問它
Remove test database and access to it? [Y/n] Y
參考連接
https://downloads.mariadb.org/mariadb/repositories/#mirror=nethub&distro=Ubuntu&distro_release=xenial–ubuntu_xenial&version=10.2
https://mariadb.com/kb/en/library/installing-mariadb-deb-files/