版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yitengtongweishi/article/details/82150617
- 添加源
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.2/ubuntu trusty main'
- 安装 MariaDB
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install mariadb-server
在安装中,会被要求设置 MariaDB 的 root 密码。
命令行进入 MariaDB,
blockchain@ThinkPad-T460:~$ mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 51
Server version: 10.2.14-MariaDB-10.2.14+maria~trusty-log mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases ;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> exit ;
Bye
blockchain@ThinkPad-T460:~$
MariaDB 安装成功。