• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Converting from MySQL to MariaDB on Ubuntu

How VPS by How VPS
January 1, 2020
in Linux
0
0
SHARES
30
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Requirements
  2. Remove MySQL
  3. Install MariaDB
  4. Handling unmet dependencies
    1. Add the g++ repository
    2. Pin the MariaDB repository
  5. Want to contribute?


This guide is intended to help you with converting a MySQL server to a MariaDB server. In addition, we will be resolving unmet dependencies that may happen during the conversion process. These steps are written to work for Ubuntu Server.

Requirements

  • A Vultr VPS running any version of Ubuntu. This article uses 14.04, but other versions should work.
  • MySQL already installed and running.
  • Knowledge of SSH, some Linux commands.

Remove MySQL

You’ll be running several commands, one after the other before we move on with installing MariaDB.

Run these commands as root or use sudo. This guide assumes that you’re running as root.

service mysql stop
apt-get remove mysql-server mysql-common libmysqlclient18

Install MariaDB

Run the following commands as root or use sudo.

apt-get install software-properties-common

Add the MariaDB repository keys.

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

Add the MariaDB repository to your server.

sudo add-apt-repository 'deb http://ftp.utexas.edu/mariadb/repo/10.0/ubuntu trusty main'

Finally, install MariaDB.

apt-get install mariadb-server libmariadbclient18

Handling unmet dependencies

The MariaDB installer may fail with an error similar to the following.

mariadb-server : Depends: mariadb-server-10.0 (specific version) but it is not going to be installed.

This can be frustrating. You will need to install all of the dependencies. The most difficult to resolve is “libstdc++6 version 4.9”. We will work around these with the following steps.

  • Add g++ repository to the server to resolve libstdc++6 dependency.
  • MariaDB repository pinning to prevent dependency issues and conflicts.

Add the g++ repository

add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install g++-4.9

Pin the MariaDB repository

This is done by creating a file with MariaDB.pref in /etc/apt/preferences.d/ with the following contents:

Package: *
Pin: origin <mirror-domain>
Pin-Priority: 1000

Replace <mirror-domain> with the mirror shown when accessing the MariaDB Repositories Selection page.

In my case, I chose the “University of Texas”. After updating it, the file now has this content:

Package: *
Pin: origin http://ftp.utexas.edu/mariadb/repo/10.0/ubuntu
Pin-Priority: 1000

Save the file, update your system.

apt-get update

The dependency issues will now be resolved. If you are running 12.04, note that there have been reports that g++ was excluded on this version.

Install MariaDB again.

apt-get install mariadb-server

Test your Maria DB installation.

service mysql start
mysql -u root -p

You’ll see similar output to the following.

Welcome to the MariaDB monitor.  Commands end with ; or /g.
Your MariaDB connection id is XXXX
Server version: 10.0.X


Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.


Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
MariaDB [(none)]>

Congratulations, you’ve successfully migrated from MySQL to MariaDB on Ubuntu!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How To Install Caddy on Linux

Next Post

Setup IonCube Loader on Ubuntu 14

Next Post

Setup IonCube Loader on Ubuntu 14

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet