天天看点

如何在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中国”