设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 技术文摘 查看内容

如何在Ubuntu 14.04 LTS上安装MariaDB

2014-11-19 15:32| 发布者: joejoe0332| 查看: 2943| 评论: 0|原作者: geekpi|来自: Linux中国

摘要: 本篇我们会讨论如何在Ubuntu上安装MariaDB。默认上MariaDB的包并没有在Ubuntu仓库中。要安装MariaDB,我们首先要设置MariaDB仓库。

  MariaDB是一个开源数据库且100%与MySQL兼容,目标是替代MySQL数据库。


MariaDB的背景 :

  2008年,MySQL被后来被Oracle在2010年收购的Sun Microsystems收购了。 最初被Sun公司的收购由于符合项目的需要而受到MySQL社区的欢呼,但是这种情绪并没有持续太久,接下来被Oracle的收购,不幸期望远远低于预期。许多MySql的开发者离开了Sun和Oracle公司开始新的项目。在他们中间就有MySQL的创建者以及项目长期技术带头人之一的Michael ‘Monty’ Widenius。Monty和他的团队创建了MySQL的一个fork版本并且命名它为MariaDB



  本篇我们会讨论如何在Ubuntu上安装MariaDB。默认上MariaDB的包并没有在Ubuntu仓库中。要安装MariaDB,我们首先要设置MariaDB仓库。


设置 MariaDB 仓库

  1. $ sudo apt-get install software-properties-common
  2. $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
  3. $ sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main'


安装 MariaDB :

  1. $ sudo apt-get update
  2. $ sudo apt-get install mariadb-server


在安装中,你会被要求设置MariaDB的root密码。


从命令行连接到MariaDB :

  1. linuxtechi@mail:~$ mysql -uroot -p
  2. Enter password:
  3. Welcome to the MariaDB monitor. Commands end with ; or \g.
  4. Your MariaDB connection id is 40
  5. Server version: 10.0.14-MariaDB-1~trusty-log mariadb.org binary distribution
  6. Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
  7. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  8. MariaDB [(none)]>


MariaDB 服务

  1. $ sudo /etc/init.d/mysql stop
  2. $ sudo /etc/init.d/mysql start


via: http://www.linuxtechi.com/install-mariadb-in-ubuntu/

作者:Pradeep Kumar 译者:geekpi 校对:wxy

本文由 LCTT 原创翻译,Linux中国 荣誉推出


酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部