MySQL 5.5 Versiyonundan MaridDB’ye Geçiş / Yazılım Güncellemesi

I – MySQL 5.5 Versiyonundan MaridDB2’ye Yazılım Güncellemesi Gerçekten Değermi? İşte Bu Geçiş İçin 10 Sebep

II – MaridDB Güncelleme Öncesi Ciddi Uyarılar ve Önlemler!

III – MaridDB Güncellemesindeki Kritik Hataların Çözümü ve MySQL Şifresini Güçlendirme

IV – MariaDB Güncelleme İşlemi ve Site Kontrolü

V – Güncelleme Sonrasındaki Ortaya Çıkan Bozuk SQL Tablolarını Onarma

VI – Güncelleme Sonrası nav_menu Testi

VII – Nginx veya Litespeed Serverınız Varsa Cachleri Temizleyin ve Tekrar Başlatın;

.

I – MySQL 5.5 Versiyonundan MaridDB2’ye Yazılım Güncellemesi Gerçekten Değermi? İşte Bu Geçiş İçin 10 Sebep

10 reasons to migrate to MariaDB (if still using MySQL)

The original MySQL was created by a Finnish/Swedish company, MySQL AB, founded by David Axmark, Allan Larsson and Michael “Monty” Widenius. The first version of MySQL appeared in 1995. It was initially created for personal usage but in a few years evolved into a enterprise grade database and it became the worlds most popular open source relational database software – and it still is. In January 2008, Sun Microsystems bought MySQL for $1 billion. Soon after, Oracle acquired all of Sun Microsystems after getting approval from the European Commission in late 2009, which initially stopped the transaction due to concerns that such a merger would harm the database markets as MySQL was the main competitor of Oracle’s database product.

MariaDB logoOut of distrust in Oracle stewardship of MySQL, the original developers of MySQL forked it and created MariaDB in 2009. As time passed, MariaDB replaced MySQL in many places and everybody reading this article should consider it too.

At Seravo, we migrated all of our own databases from MySQL to MariaDB in late 2013 and during 2014 we also migrated our customer’s systems to use MariaDB.

We recommend everybody still using MySQL in 2015 to migrate to MariaDB for the following reasons:

1) MariaDB development is more open and vibrant

Unlike many other open source projects Oracle inherited from the Sun acquisition, Oracle does indeed still develop MySQL and to our knowledge they have even hired new competent developers after most of the original developers resigned. The next major release MySQL 5.7 will have significant improvement over MySQL 5.6. However, the commit log of 5.7 shows that all contributors are @oracle.com. Most commit messages reference issue numbers that are only in an internal tracker at Oracle and thus not open for public discussion. There are no new commits in the latest 3 months because Oracle seems to update the public code repository only in big batches post-release. This does not strike as a development effort that would benefit from the public feedback loop and the Linus law of “given enough eyes all bugs are shallow”.

MariaDB on the other hand is developed fully in the open: all development decisions can be reviewed and debated on a public mailing list of in the public bug tracker. Contributing to MariaDB with patches is easy and patch flow is transparent in the fully public and up-to-date code repository. The Github statistics forMySQL 5.7 show 24 contributors while the equivalent figure for MariaDB 10.1 is 44 contributors. But it is not just a question of code contributors – in our experience MariaDB seems more active also indocumentation efforts, distribution packaging and other related things that are needed in day-to-day database administration.

Because of the big momentum MySQL has had, there is still a lot of community around it but there is a clear trend that most new activities in the open source world revolve around MariaDB.

As Linux distributions play a major role in software delivery, testing and quality assurance, the fact that the both RHEL 7 and SLES 12 ship with MariaDB instead of MySQL increases the likelihood that MariaDB is going to be better maintained both upstream and downstream in years to come.

2) Quicker and more transparent security releases

Oracle only has a policy to make security releases (and related announcements) every three months for all of their products. MySQL however has a new release every two months. Sometimes this leads situations where security upgrades and security information are not synced. Also the MySQL release notes do not list all the CVE identifiers the releases fix. Many have complained that the actual security announcements are very vague and do not identify the actual issues or the commits that fixed them, which makes it impossible to do backporting and patch management for those administrators that cannot always simply upgrade to the latest Oracle MySQL release.

MariaDB however follows good industry standards by releasing security announcements and upgrades at the same time and handling the pre-secrecy and post-transparency in a proper way. MariaDB release notes also list the CVE identifiers pedantically and they even seem to update the release notes afterwards if new CVE identifiers are created about issues that MariaDB has already released fixes for.

3) More cutting edge features

MySQL 5.7 is looking promising and it has some cool new features like GIS support. However, MariaDB has had much more new features in recent years and they are released earlier, and in most cases those features seem to go through a more extensive review before release. Therefore we at Seravo trust MariaDB to deliver us the best features and least bugs.

For example GIS features were introduced already in the 5.3 series of MariaDB, which makes storing coordinates and querying location data easy. Dynamic column support (MariaDB only) is interesting because it allows for NoSQL type functionality, and thus one single database interface can provide both SQL and “not only SQL” for diverse software project needs.

4) More storage engines

MariaDB in particular excels as the amount of storage engines and other plugins it ships with: Connect and Cassandra storage engines for NoSQL backends or rolling migrations from legacy databases, Spider for sharding, TokuDB with fractal indexes etc. These plugins are available for MySQL as well via 3rd parties, but in MariaDB they are part of the official release, which guarantees that the plugins are well integrated and easy to use.

5) Better performance

MariaDB claims it has a much improved query optimizer and many other performance related improvements. Certain benchmarks show that MariaDB is radically faster than MySQL. Benchmarks don’t however always directly translate to real life situations. For example when we at Seravo migrated from MySQL to MariaDB, we saw moderate 3-5 % performance improvements in our real-life scenarios. Still, when it all adds up, 5% is relevant in particular for web server backends, where every millisecond counts. Faster is always better, even if it is just a bit faster.

6) Galera active-active master clustering

Galera is a new kind of clustering engine which, unlike traditional MySQL master-slave replication,provides master-master replication and thus enables a new kind of scalability architecture for MySQL/MariaDB. Despite that Galera development already started in 2007, it has never been a part of the official Oracle MySQL version while both Percona and MariaDB flavors have shipped a Galera based cluster version for years.

Galera support will be even better in MariaDB 10.1, as it will be included in the main version (and not anymore in a separate cluster version) and enabling Galera clustering is just a matter of activating the correct configuration parameters in any MariaDB server installation.

7) Oracle stewardship is uncertain

Many people have expressed distrust in Oracle’s true motivations and interest in keeping MySQL alive. As explained in point 1, Oracle wasn’t initially allowed to acquire Sun Microsystems, which owned MySQL, due to the EU competition legislation. MySQL was the biggest competitor to Oracle’s original database. The European Commission however approved the deal after Oracle published an official promise to keep MySQL alive and competitive. That document included an expiry date, December 14th 2014, which has now passed. One can only guess what the Oracle upper management has in mind for the future of MySQL.

Some may argue that in recent years, Oracle has already weakened MySQL in subtle ways. Maybe, but in Oracle’s defense, it should be noted that MySQL activities have been much more successful than for example OpenOffice or Hudson, which both very quickly forked into LibreOffice and Jenkins with such a momentum, that the original projects dried up in less than a year.

However, given the choice between Oracle and a true open source project, the decision should not be hard for anybody who understands the value of software freedom and the evolutive benefits that stem from global collaborative development.

8) MariaDB has leapt in popularity

In 2013 there was news about Wikipedia migrating it’s enormous wiki system from MySQL to MariaDB and about Google using MariaDB in their internal systems instead of MySQL. One of the MariaDB Foundation sponsors is Automattic, the company behind WordPress.com. Other notable examples are booking.comand Craigslist. Fedora and OpenSUSE have had MariaDB as the default SQL database option for years. With the releases of Red Hat Enterprise Linux 7 and SUSE Enterprise Linux 12 both these vendors ship MariaDB instead of MySQL and promises to support their MariaDB versions for the lifetime of the major distribution releases, that is up to 13 years.

The last big distribution to get MariaDB was Debian (and based on it, Ubuntu). The “intent to package” bug in Debian was already filed in 2010 but it wasn’t until December 2013 that the bug finally got closed. This was thanks to Seravo staff who took care of packaging MariaDB 5.5 for Debian, from where it also got into Ubuntu 14.04. Later we have also packaged MariaDB 10.0, which will be included in the next Debian and Ubuntu releases in the first half of 2015.

9) Compatible and easy to migrate

MariaDB 5.5 is a complete drop-in-replacement for MySQL 5.5. Migrating to MariaDB is as easy as running apt-get install mariadb-server or the equivalent command on your chosen Linux flavor (which, in 2015, is likely to include MariaDB in the official repositories).

Despite the migration being easy, we still recommend that database admins undertake their own testing and always back up their databases, just to be safe.

10) Migration might become difficult after 2015

In versions MariaDB 10.0 and MySQL 5.6 the forks have already started to diverge somewhat but most likely users can still just upgrade from 5.6 to 10.0 without problems. The compatibility between 5.7 and 10.1 in the future is unknown, so the ideal time to migrate is now while it is still hassle-free. If binary incompatibilities arise in the future, database admins can always still migrate their data by dumping it and importing it in the new database.

With the above in mind, MariaDB is clearly our preferred option.

One of our customers once expressed their interest in migrating from MySQL to MariaDB and wanted us to confirm whether MariaDB is bug-free. Tragically we had to disappoint them with a negative answer. However we did assure them that the most important things are done correctly in MariaDB making it certainly worth migrating to.

.

II – MaridDB Güncelleme Öncesi Ciddi Uyarılar ve Önlemler!

Güncelleme Öncesinde Konu Hakkında Birçok Makale Okudum, Olabilecek Sıkıntıları Gözden Geçirdim ve Yaklaşık 1,5 Saatlik Araştırmamın Sonunda Tam Vazgeçiyordum, Baktımki Konu Hakkında Hiçbir Türkçe Döküman Yok, İnsanların Umudunu Kırmaktansa Konu Hakkında Döküman Yazmaya Karar Verdim;

Özet Olarak Uyarılar Şu Şekilde;

1 – WHM Yazılımınız Güncel Olsun (11.48)

2 – Sadece Profosyonel Kişiler Bu Güncellemeyi Gerçekleştirsin (Ben Linux Komutlarını Bile Bilmiyorum)

3 – Mutlaka MySQL Verisyonunuz Enaz 5.5 ve Üstü Olsun!

4 – İşlem Sonucu Oluşabilecek Veri Kayıplarından Biz Sorumlu Değiliz;

5 – Bu İşlem Enderde Olsa DB nizin Bozulmasına Sebep Olabilir, İşlem Öncesi Mutlaka SQL Yedeğinizi Alın!

6 – Bu Güncelleme Terse Çalışmıyor, Yani MariaDB’den Tekrar MySQL 5.5 veya MySQL 5.6’ya Downgrade Edemezsiniz

MariaDB güncelleme uyarıları (3)

MariaDB güncelleme uyarıları (4)

 

Normalde Bu İşlemde Bir Sıkıntı Çıkmaz Ama Olurda Çıkarsa

MariaDB güncelleme uyarıları (2)

.

II – MaridDB Güncellemesindeki Kritik Hataların Çözümü ve MySQL Şifresini Güçlendirme

1 – Güncelleme İşlemine Başlamadan Önce Bildiğiniz Bütün Duaları Okuyabilirisniz Çünkü Direk DB ile Oynuyoruz, Tablolarımız Değişecek, Eğer Bir Sıkıntı Olursa Bütün Server’ı Tekrar Kurmak Zorunda Kalabilirsiniz Çünkü Downgrade Edilemeyen Bir İşlem;

Herneyse, Güncelleme İçin WHM’ye Login Olduktan Sonra Software -> MySQL/MariaDB Upgrade Kısmına Gidiyoruz ve MariaDB 10.0’u Seçerek En Alt Kısımdaki “Next” Tuşuna Basıyoruz;

1 - Whm Mariadb güncellemesi (1)

2 – Güncelleme Sırasında Karşıma Çıkan Kritik Hata Bana MySQL Kullanıcı Şifremi Güçlendirmek Şeklindeydi;

1 - Whm Mariadb güncellemesi (2)

3 – Bu Problemi Gidermek İçin SQL Services -> Change MySQL User Password Kısmına Gelin ve Kullanıcı Şifrenizi Daha Güçlü Bir Şifre İle Değiştirin.

Önemli: Bu İşlem Sonucunda Winscp İle Sitenize Bağlanıp wp-config.php den Bu Kullanıcının Şifresinide Güncellemeyi Unutmayın (Yoksa Database’e Ulaşılmıyor Hatası Alırsınız

2 - MySQL Şifre Değiştirme (1) 2 - MySQL Şifre Değiştirme (2)

.

III – MariaDB Güncelleme İşlemi ve Site Kontrolü

1 – Problemi Giderdikten Sonra Güncelleme Kısmına Tekrar Geliyoruz ve 3 İle İşaetlediğin Yerdeki Checkbox ları İşaretliyoruz;

3 - Mariadb Upgrade (1)

2- Continue İle Devam Ediyoruz;

3 - Mariadb Upgrade (2)

3 – Karşımıza 3 Tane Seçenek Geliyor. Bana “Zaten MySQL 5.5 Versiyonundasın, Kullanıncı Kütüphanelerin Uyumlu Panpa” Dediği İçin Ortadaki Seçeneği Seçiyorum (Minimum Risk Herzaman En İyisidir?)

4 - rebulding apachi

4 – Yaklaşık 15-20 Dk Süren Bir Güncelleme Başlıyor;

5 - MariDb güncelleme işlemi (1)

5 - MariDb güncelleme işlemi (2)

5 – Güncellemenin Başarılı Olduğuna Dair Bir Mesaj Geliyor (Ama 3 Tablom Bozuk Görünüyor)

5 - MariDb güncelleme işlemi (3)

6 – Program Kendi Kendisine EasyApache Güncellenemesi Yapıyor;

5 - MariDb güncelleme işlemi (4)

7 – Siteye Girdiğimizde Hala Problemsiz Çalıştığını Görüyoruz ve Kocaman bir “OHHH..” Çekiyoruz;

5 - MariDb güncelleme işlemi (6)

.

IV – Güncelleme Sonrasındaki Ortaya Çıkan Bozuk SQL Tablolarını Onarma

1 – Önce Hızlıca SQL Yedeğimizi Alıyoruz;

6 - MySQL tablo onarma (2)

2 – Konuyu Araştırdığımızda PhpMyAdmin’den Güncelleyebileceğimizi Görüyoruz;

6 - MySQL tablo onarma (3)

3 – Bozuk Tablolarım 3 Tane Görünyordu, Bu Tabloları Seçip En Alt Kısımda Bulundan Menüden “Tabloyu Onar” Seçeneğini Seçiyoruz

6 - MySQL tablo onarma (4)

4  – Ve Tablolarımızın Onarıldığına Dair Mesaj Alıyoruz,

6 - MySQL tablo onarma (5)

.

VI – Güncelleme Sonrası nav_menu Testi

Her Büyük Server İşlemi Sonrasında Görünüm -> Menüler Kısmında Testlerde Kullandığınız Bir Menüye Sayfa Eklemeyi Deneyin;

7 - menü testi 1

Problemsizce Ekleyebiliyorum, Buda Herşeyin Yolunda Gittiğini Gösteriyor;

7 - menü testi 2

.

VII – Nginx veya Litespeed Serverınız Varsa Cachleri Temizleyin ve Tekrar Başlatın;

8 - Nginx purge and restart

13 - litespeed menü

 

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>