这篇文章主要介绍了在Ubuntu系统中安装MariaDB数据库的教程,同时也适用于其他Debian系的Linux系统,需要的朋友可以参考下
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 仓库
$ 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
在安装中,你会被要求设置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 服务
$ sudo /etc/init.d/mysql stop
$ sudo /etc/init.d/mysql start
本文标题为:在Ubuntu系统中安装MariaDB数据库的教程


基础教程推荐
- DB2优化(简易版) 2024-01-01
- mysql语法中有哪些可以删除日志的命令 2024-12-16
- [Redis] redis业务实践 , 这次用哈希 2024-04-24
- 一文快速回顾 Java 操作数据库的方式-JDBC 2024-04-24
- docker 安装redis以及删除 2023-09-13
- CAT分布式实时监控系统使用详解 2024-02-14
- PostgreSQL limit的神奇作用详解 2023-07-21
- PHP 分页类(模仿google)-面试题目解答 2024-02-14
- 如何查看PostgreSQL数据库中所有表 2023-07-21
- 具有负载均衡功能的MySQL服务器集群部署及实现 2023-12-29