Mysql
如何在 Debian 9 上安裝 MySQL 伺服器
我嘗試使用命令安裝 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-server-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
MariaDB 是 MySQL。引用MariaDB 的維基百科頁面:
MariaDB 是 MySQL 關係數據庫管理系統的社區開發分支,旨在在 GNU GPL 下保持免費。開發由 MySQL 的一些原始開發人員領導,由於擔心它被甲骨文公司收購,他們分叉了它。
據報導,MariaDB 具有比 MySQL 更好的性能,並且許可條件限制較少。出於這個原因,現在所有主要的 Linux 發行版都使用 MariaDB 而不是 MySQL。它是完全兼容的,每個 MySQL 客戶端都可以連接到 MaraDB 並且不會注意到任何差異,因此沒有理由更喜歡 MySQL 而不是 MariaDB。