我尝试使用命令安装 mysql 服务器apt-get install mysql-server mysql-common
但输出是:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-common is already the newest version (5.8+1.0.2).
The following additional packages will be installed:
default-mysql-server mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mariadb-server-10.1 mariadb-server-core-10.1
Suggested packages:
mariadb-test netcat-openbsd tinyca
The following NEW packages will be installed:
default-mysql-server mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-server
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.8 MB/18.8 MB of archives.
After this operation, 169 MB of additional disk space will be used.
Do you want to continue? [Y/n]
正如你所看到的没有安装mysql服务器,但是mariadb-服务器-10.1为什么?
我想要 mysql 而不是 mariadb。
资料来源列表:
deb http://ftp.fr.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ stretch main contrib non-free
# Security
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free
# Backports
deb http://ftp.debian.org/debian/ stretch-backports main contrib non-free
答案1
MariaDB 就是 MySQL。引自MariaDB 的维基百科页面:
MariaDB 是 MySQL 关系数据库管理系统的一个社区开发分支,旨在根据 GNU GPL 保持免费。开发由 MySQL 的一些原始开发人员领导,他们出于对 Oracle Corporation 收购的担忧而对其进行了分叉。
据报道,MariaDB 的性能优于 MySQL,而且许可条件限制较少。因此,目前所有主流 Linux 发行版都提供 MariaDB 而不是 MySQL。它完全兼容,每个 MySQL 客户端都可以连接到 MaraDB,不会注意到任何差异,因此没有理由选择 MySQL 而不是 MariaDB。