Beyond MySQL --Branching the popular database--转载

原文:http://www.ibm.com/developerworks/library/os-beyondmysql/

MySQL is one of the most popular free and open source programs in history. It's the database backbone for thousands of websites and could arguably be given credit (along with Linux®) for the explosive growth of the Internet over the past 10 years.

So,if MySQL is so important,why is increasing amount of high profile off-shoots of the core MySQL product? Because MySQL is free and open source,developers have always been able to take the code,modify it as they see fit,and distribute it on their own. For a long time,there weren't any branches of MySQL that a developer would trust in their own production environment. However,that's changing rapidly. Several branches are getting a lot of attention.

This article will discuss three popular branches of MySQL that are gaining attention: Drizzle,MariaDB,and Percona Server,including the XtraDB engine. This article will talk briefly about the reasons for each branch and their goals,and whether to use them in your own production environment. By the time you finish this article,you should be able to answer the question "Are these MySQL branch products a good solution for my environment?"

Why does MySQL need to be branched? That's a very legitimate question. Thousands of websites depend on it and it seems to be a good solution for many people. However,as is often the case,what's good for many people isn't good for all people. Some developers are motivated to make things better for their own needs. What could be better than turning a great solution into the perfect solution?

Let's get into more specific details about what these branches sought to change. Some branches felt that MySQL was becoming too bloated and was offering many features that would never interest users,at the expense of simplicity of performance. If people were perfectly happy with the more streamlined MySQL 4,why should they deal with the additional complexity that was added with MySQL 5? For this branch,a preferred branch of MySQL would be simpler and faster — offer less features,but make them extremely quick,keeping in mind a target audience,in this case high availability websites.

To other branches,MySQL wasn't offering enough new features,or were adding them too slowly. They may have felt that MySQL wasn't keeping up with its target markets of high availability websites running on multi-core processors with lots of RAM. As people familiar with MySQL know,it offers two different storage enginges — MyISAM and InnoDB. This branch felt that neither of these storage engines offered them exactly what they were looking for,so they created a new storage engine perfectly suited for their goals.

Further,some branches have a top goal to be a "drop in" replacement to MySQL,where you could simply drop in their branch and not have to change one line of code. The branch uses the same code and interfaces as MySQL,making a transition as easy as possible. Yet,another branch boasts that it's not compatible with MySQL,requiring code changes. Each branch is also at a different maturity level,with some claiming they are production ready,and some claiming they are far from that goal at this point.

Finally,there's uncertainty about how MySQL will fare under Oracle. Oracle bought Sun,who bought MySQL,and right now Oracle controls the MySQL product itself,and leads the development community in producing new finished products. Because Oracle already has a commercial database,there is concern that they may not put sufficient resources into MySQL to keep it cutting-edge. Therefore,many branches are also a result of the underlying fear that MySQL,the leading free and open source database,may see less features,slower release cycles,and more expensive support.

XtraDB is not a stand-alone product itself,but it is still considered a branch of MySQL. XtraDB is actually a storage engine for MySQL-based databases. This would be considered an additional storage engine to the standard MyISAM and InnoDB that are already a part of MySQL. MySQL 4 and 5 installs with each table using the default MyISAM storage engine. InnoDB is also a relatively newer option for a storage engine,and database administrators and developers can choose the types of storage engine,on a per table basis,when they set up the database. The major difference between the two storage engines is that MyISAM does not offer transactional support,while InnoDB does. Other differences are many small performance differences,with InnoDB offering many small performance improvements over MyISAM,and more reliability and safety when dealing with potential data loss. As it appears that InnoDB is the better-suited storage engine for future improvements,MySQL has switched the default storage engine to InnoDB instead of MyISAM starting with the 5.5 release.

Building on these advantages,the InnoDB storage engine itself has been branched into a newer storage engine called XtraDB. Just how new is this storage engine? It was first released less than 3 years ago by Percona. So,it's relatively new. It was designed specifically to deal with modern high availability websites running on modern servers. It was designed to run on servers with a dozen or more cores and lots of RAM (32 GB and more). These are the kinds of servers any company can order from a server management company,and therefore,a database should be designed to take full advantage of these servers.

The XtraDB branch had another goal — be a simple drop-in replacement for the InnoDB storage engine,so that users could simply switch their storage engine without having to change any of their underlying application code. XtraDB had to be backwards-compatible with InnoDB in addition to providing all the new features and improvements they wanted to add. They accomplished this goal.

How much faster is XtraDB? One performance test I found said that it offered 2.7x more transactions per minute than the built-in MySQL 5.1 InnoDB engine (See ). That's certainly not something to dismiss,especially considering it's drop-and-go.

XtraDB offers some great improvements over built-in MySQL storage engines,but it's not a stand-alone product,and nor is it something that you can simply drop into your existing MySQL installation. So,if you want to use this new storage engine,you have to use a product that offers it.

Percona Server is just such a product,put out by the leading MySQL consulting company,Percona. It's a stand-alone database product that offers users the ability to swap out their MySQL installation and swap in the Percona Server product,and by doing so,take advantage of the XtraDB storage engine. It makes the claim that it is fully compatible with MySQL,so in theory no code would have to change in your software. That's definitely a huge advantage,and great for quality control when you're looking for a quick performance improvement. So,a good reason for looking at Percona Server is to take advantage of the XtraDB engine with as few changes to your core code as possible.

Additionally,they are the original authors of the XtraDB storage engine. Percona open-sourced this code so you can find it in other products,but the original creators of the engine are the same ones who wrote this product. You can use this information as you wish.

Here are the purported claims of Percona Server,coming from their own website:

    Scalability: Handles more transactions; scales up on powerful servers
  • Performance: Percona Server with XtraDB is blazingly fast
  • Reliability: Resilience to corruption,crash-safe replication
  • Management: Online backup,online table import/export
  • Diagnostics: Advanced profiling and instrumentation
  • Flexibility: Variable page size,improved buffer pool management

The final claim by the Percona team is that it is "the closest to the official MySQL Enterprise releases from Oracle",thereby differentiating it from the other branches who have changed more underlying core MySQL code. One negative to Percona Server is that they manage the code themselves,and don't accept contributions from outside developers without reviewing it first,ensuring that they control the features put into the product.

Another product that offers the XtraDB storage engine is the MariaDB product. It is very similar to the Percona product,but offers more underlying code changes in an effort to tweak out even more performance improvements over the standard MySQL. It utilizes the XtraDB engine directly from Percona,so there's no underlying differences in the storage engines each employ,since they utilize the same exact one.

Further,MariaDB offers the standard storage engines that MySQL offers,MyISAM and InnoDB. So,in effect,it can be considered a superset of MySQL,offering everything that MySQL does,and more. It also makes the claim that it's a drop-in replacement for MySQL,so you can install it with the knowledge that no underlying code changes would be necessary to switch from MySQL to MariaDB.

Finally,and perhaps most importantly,the lead creator of the MariaDB is Monty Widenius,the original creator of MySQL. Monty has formed a company to manage the development of MariaDB called Monty Program,which hires developers to write and improve the MariaDB product. This is potentially both a good and bad thing: it's good in that they are the lead in the features and bugs fixed with Maria,but it's potentially troublesome in that the company isn't revenue-focused,but rather product driven. Companies that don't generate revenue don't always last forever.

The final product we'll be looking at is Drizzle. Unlike the other two finished products we've looked at,Drizzle is a major departure from MySQL and even makes the claim that they are not a drop-and-go with MySQL. They are looking to make more major changes from MySQL and have a goal of providing a great solution to the high availability problem,even if that means changing aspects of MySQL that we are accustomed to.

On the company's FAQ page,reading through the questions further reinforces their underlying goals. They weren't happy with the changes made to the MySQL core after the 4.1 release,claiming that many developers didn't want that additional overhead. They admit that their product is not even an SQL-compliant relation database. That really is a departure from MySQL.

So,with such a major change from your accustomed-to MySQL,why should we even consider this product? Exactly for those same reasons — it's a major rewrite of the MySQL engines,with the features judged non-optimal and unneeded stripped out,and with much of the code rewritten to be optimized,even going so far as to switch from C to C++ for the code. And,it doesn't end there,this product has a specific target market in mind with its design — multi-core servers with lots of RAM,64-bit machines running Linux,servers used in Cloud computing,servers hosting websites,servers getting tens of thousands of hits per minute. That's a pretty specific market. Is it too specific? Keep in mind how much money those types of companies spend on their databases currently — if they can install Drizzle instead of MySQL and cut their server costs in half that's a lot of money!

So,everyone should be using Drizzle then,right? Wait,as they point out repeatedly,it's not compatible with MySQL. Therefore,if you have an existing MySQL platform,there would be a lot of code rewriting in order to get it working properly within your environment.

Even though it requires extra work to get running and doesn't appear to be as quick and easy to use as Percona or MariaDB,I include Drizzle because,though it may not be your choice today,in a few years time,it will likely be some people's choice. Because the goal of this article is to raise your awareness of tools you'll be using in the future,this is a good opportunity to show you this product. Many leading DB experts believe that Drizzle will be the choice of high availability database installations in five years.

Drizzle is 100 percent open source and openly takes contributions from developers. There's no underlying company backing development of it like MariaDB,and it's not closed to outside contributions,like Percona. It's in a good position for growth and new features,which it may need,given its scope to rewrite a majority of MySQL.

Here is a summary of the three MySQL branch products mentioned in this article.

This article discussed three new branches of the MySQL product that aim to solve some issue they've identified with MySQL. All three are free and open source products themselves. You need to weigh the pros and cons of using them against what MySQL already offers. I believe,for nearly everyone reading this article,MySQL will still be the preferred choice for your database needs. I highly doubt very many readers of this article are the owners of websites getting 1,000,000 hits an hour. I want to stress that again — MySQL is still an incredibly great product that is a perfectly suitable database for most use cases.

However,for those of you who think your site requires more high availability,scalability,and perfomance than MySQL can currently offer,one of these three products may likely provide the solution you are looking for. Going further,if you feel that your site will become a billion-dollar idea,you might consider starting out with one of these three products,and thereby solve these types of problems before they ever start.

Finally,the root cause of these branches of MySQL is to change some underlying feature of MySQL that the authors felt they couldn't wait for MySQL to do themselves. Further,the spectre of Oracle hangs over the future of MySQL,and many developers,including the original developer of MySQL,are concerned about the future of the product and whether Oracle will show the devotion to the product that a leading-edge database requires. These are all valid concerns in my opinion,and for this reason,you should keep these three products in mind as we move into the future.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


安装开始...1.打开“https://dev.mysql.com/downloadsepo/yum/”下载Mysql源      将下载好的mysql源上传linux服务器 2.yumlocalinstallmysql80*#安装源 centos7中默认安装的是mariadb数据库,如果想要安装mysql,首先要移除mariadb;
安装Helm3#官网下载慢#wgethttps://get.helm.sh/helm-v3.5.4-linux-amd64.tar.gzwgethttp://qiniu.dev-share.top/helm-v3.5.4-linux-amd64.tar.gztar-zxvfhelm-v3.5.4-linux-amd64.tar.gzcplinux-amd64/helm/usr/local/bin#查看helmclient版本helmversion
通过Linux命令行启动用的指令:systemctlstartmariadb.service反馈:Failedtostartmariadb.service:Unitmariadb.servicenotfound.MariaDB简介MariaDB是MySQL的一个分支,MariaDB打算保持与MySQL的高度兼容性,确保具有库二进制奇偶校验的直接替换功能,以及与MySQLAPI和命令
InstallingMariaDBServer10.4TodeployMariaDBCommunityServer10.4onRHEL7orCentOS7,firstdownloadandusethe mariadb_repo_setup scripttoconfiguretheMariaDBrepositoriesforYUM:$sudoyuminstallwget$wgethttps://downloads.mariadb.com/
阅读目录一什么是存储引擎二mysql支持的存储引擎三使用存储引擎一什么是存储引擎mysql中建立的库--> 文件夹库中建立的表--> 文件现实生活中我们用来存储数据的文件有不同的类型,每种文件类型对应各自不同的处理机制:比如处理文本用txt类型,处理表格用excel,处理图片
1、安装MariaDB安装命令yum-yinstallmariadbmariadb-server安装完成MariaDB,首先启动MariaDBsystemctlstartmariadb设置开机启动systemctlenablemariadb[root@node1~]#systemctlenablemariadbCreatedsymlinkfrom/etc/systemd/system/multi-user.target.wants/m
Centos7.5 刚安装的mariadb数据库报错报错:ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:NO)原因一:没有启动数据库解决方法:systemctlstartmariadbsystemctlenablemariadb原因二:未知解决方法:[root@db01~]#
基于YUM安装的mariadb多实例.=================================================================1.yum安装mariadb-server包#yuminstallmariadb-server2.创建多实例对应的目录结构#mkdir/mysql/{3306,3307,3308}/{data,etc,socket,log,bin,pid}-pv#tree/mysql//mysql/
一、系统环境[root@localhost~]#cat/etcedhat-releaseCentOSLinuxrelease7.6.1810(Core)二、mysql安装#yuminstallmysqlmysql-servermysql-devel安装mysql-server失败,如下图:[root@localhost~]#yuminstallmysql-serverLoadedplugins:fastestmirrorLoadingm
数据库的选择两大点是:开源和跨平台,满足这三点MySQL、MongoDB和MariaDB。其中MariaDB是MySQL的分支,也是它的进阶产品,未来很有可能替代MySQL。与MySQL相比较,MariaDB更强的地方在于:Maria 存储引擎PBXT存储引擎XtraDB 存储引擎FederatedX 存储引擎更快的复制查询处理线
使用Navicat连接数据库时出现了 HostxxxisnotallowedtoconnecttothisMariaDbserver的情况。发现了是因为授权的问题,使得连接权限受阻。所以,只需要进入数据库中,给予其权限即可。具体解决代码如下:[root@localhost~]#mysql-uroot-pEnterpassword:#首先进入mys
1.临时表当绘画结束时,临时表会自动销毁,无法用showtables查看临时表。MariaDB[jason]>createtemporarytabletmp(prochar(30),citychar(30));QueryOK,0rowsaffected(0.01sec)MariaDB[jason]>insertintotmpvalues('shanghai','shanghai');QueryOK,1
为了看阳光我来到世上数据库介绍数据库是一个存放数据的仓库,目前市面上最流行的数据库大致氛围的两种,一种叫做关系型数据库,一种叫做非关系型数据库,而关系型数据库近期流行的即为mysql,mysql原本是一个开源的数据库后被oracle公司收购,开始进行服务收费,因此,市面上大多数免费
1,Linux上的mysql MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区采用分支的方式来避开这个风险。MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松
启动Mariadb前提需安装mariadb-server-安装mariadb-serveryuminstall-ymariadb-server-启动服务systemctlstartmariadb.service-添加到开机启动systemctlenablemariadb.service-安全设置,以及修改数据库管理员密码mysql_secure_installation-启
1、查看是否安装及可用安装:yumlist|grepmaria2、安装maria(依赖其他几个安装包):yuminstallmariadb-server.x86_64输入'y'继续安装直到安装结束3、检查是否安装:4、安装完后登录提示错误:mysql-uroot-p是由于安装完但是并未启动maria服务5、启动maria有以下几种方法:system
通过yum安装mariadb,并配置MySQL主从服务器主服务器:192.168.10.11从服务器:192.168.10.12#!/bin/bash#====================================================#Author:Mr.Song#CreateDate:2019-02-21#Description:autoconfigMySQLmaster&slave#=====================
实验:实现基于SSL加密的主从复制实验步骤:环境:三台主机,一台CA:200,一台master:150,一台slave:100平时都是在CA上帮用户生成私钥,在服务器上做的1CA,master,slave的证书相关文件mkdir/etc/my.cnf.d/sslcd/etc/my.cnf.d/sslopensslgenrsa2048>cakey.pemopensslreq-new-x509-k
MariaDB[db1]>select*fromstudent;+----+------+-----+--------+-------+|id|name|age|gender|phone|+----+------+-----+--------+-------+|1|a|20|m|119||2|b|20|m|120||3|c|20|m|110
过年了,在老家闲余时间想敲敲代码,发现在安装mariaDb的时候一直报错错误信息:Service‘MySQL’(MySQL)Faildtostart,Verifythatyouhavesuffcientprivilegestostartsystemservices.服务的MySQL(MySQL)启动错误,确认你有权限启动系统服务。记得多年前在使用sqlserver数