在Ubuntu系統(tǒng)中安裝MariaDB數(shù)據(jù)庫的教程
MariaDB是一個開源數(shù)據(jù)庫且100%與MySQL兼容,目標(biāo)是替代MySQL數(shù)據(jù)庫。
MariaDB的背景 :
2008年,MySQL被后來被Oracle在2010年收購的Sun Microsystems收購了。 最初被Sun公司的收購由于符合項(xiàng)目的需要而受到MySQL社區(qū)的歡呼,但是這種情緒并沒有持續(xù)太久,接下來被Oracle的收購,不幸期望遠(yuǎn)遠(yuǎn)低于預(yù)期。許多MySql的開發(fā)者離開了Sun和Oracle公司開始新的項(xiàng)目。在他們中間就有MySQL的創(chuàng)建者以及項(xiàng)目長期技術(shù)帶頭人之一的Michael ‘Monty" Widenius。Monty和他的團(tuán)隊創(chuàng)建了MySQL的一個fork版本并且命名它為MariaDB。
本篇我們會討論如何在Ubuntu上安裝MariaDB。默認(rèn)上MariaDB的包并沒有在Ubuntu倉庫中。要安裝MariaDB,我們首先要設(shè)置MariaDB倉庫。
設(shè)置 MariaDB 倉庫
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db $ sudo add-apt-repository "deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main"
安裝 MariaDB :
$ sudo apt-get update $ sudo apt-get install mariadb-server
在安裝中,你會被要求設(shè)置MariaDB的root密碼。
從命令行連接到MariaDB :
linuxtechi@mail:~$ mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 40 Server version: 10.0.14-MariaDB-1~trusty-log mariadb.org binary distribution Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others. Type "help;" or "\h" for help. Type "\c" to clear the current input statement. MariaDB [(none)]>
MariaDB 服務(wù)
$ sudo /etc/init.d/mysql stop $ sudo /etc/init.d/mysql start
相關(guān)文章:
1. MariaDB表表達(dá)式之公用表表達(dá)式(CTE)2. centos編譯安裝mariadb的詳細(xì)過程3. 詳解Centos 使用YUM安裝MariaDB4. centos 7安裝mysql5.5和安裝 mariadb使用的命令5. 詳談MySQL和MariaDB區(qū)別與性能全面對比6. MariaDB10.5.6的安裝與使用詳解7. mariadb的主從復(fù)制、主主復(fù)制、半同步復(fù)制配置詳解8. Mysql/MariaDB啟動時處于進(jìn)度條狀態(tài)導(dǎo)致啟動失敗的原因及解決辦法9. mariadb 在低配 VPS 上崩潰問題處理方案10. MariaDB性能調(diào)優(yōu)工具mytop的使用詳解
