天天看點

如何在Ubuntu 14.04 LTS上安裝MariaDB如何在Ubuntu 14.04 LTS上安裝MariaDB

mariadb是一個開源資料庫且100%與mysql相容,目标是替代mysql資料庫。

<a target="_blank"></a>

2008年,mysql被後來被oracle在2010年收購的sun microsystems收購了。 最初被sun公司的收購由于符合項目的需要而受到mysql社群的歡呼,但是這種情緒并沒有持續太久,接下來被oracle的收購,不幸期望遠遠低于預期。許多mysql的開發者離開了sun和oracle公司開始新的項目。在他們中間就有mysql的建立者以及項目長期技術帶頭人之一的michael ‘monty’ widenius。monty和他的團隊建立了mysql的一個fork版本并且命名它為mariadb。

如何在Ubuntu 14.04 LTS上安裝MariaDB如何在Ubuntu 14.04 LTS上安裝MariaDB

本篇我們會讨論如何在ubuntu上安裝mariadb。預設上mariadb的包并沒有在ubuntu倉庫中。要安裝mariadb,我們首先要設定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'

$ sudo apt-get update

$ sudo apt-get install mariadb-server

在安裝中,你會被要求設定mariadb的root密碼。

如何在Ubuntu 14.04 LTS上安裝MariaDB如何在Ubuntu 14.04 LTS上安裝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)]&gt;

$ sudo /etc/init.d/mysql stop

$ sudo /etc/init.d/mysql start

原文釋出時間:2014-11-19

本文來自雲栖合作夥伴“linux中國”