Setting Up MariaDB 10.0 (Debain Instructions)

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
inerd
Posts: 21
Joined: Sun Dec 29, 2013 3:14 am
Location: United Kingdom
Contact:

Setting Up MariaDB 10.0 (Debain Instructions)

Postby inerd » Wed Sep 10, 2014 2:45 pm

This has been tested countless amount of times and it works with the Vesta Stack

1.) Setup the repo's:

Debian 7:

Code: Select all

sudo apt-get install python-software-properties

Code: Select all

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

Code: Select all

sudo add-apt-repository 'deb http://mirror.stshosting.co.uk/mariadb/repo/10.0/debian wheezy main'


Ubuntu 12.04:

Code: Select all

sudo apt-get install python-software-properties

Code: Select all

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

Code: Select all

sudo add-apt-repository 'deb http://mirror.stshosting.co.uk/mariadb/repo/10.0/ubuntu precise main'


Ubuntu 14.04:

Code: Select all

sudo apt-get install software-properties-common

Code: Select all

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

Code: Select all

sudo add-apt-repository 'deb http://mirror.stshosting.co.uk/mariadb/repo/10.0/ubuntu trusty main'


2.) Run the install (This will replace MySQL with MariaDB) You should backup data but its not essential as I did not lose any data after the install

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get install mariadb-server


3.) Reboot (To make sure everything starts nice and fresh)

mehargags
Moderators
Posts: 743
Joined: Sat Sep 06, 2014 9:58 pm

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby mehargags » Thu Sep 11, 2014 1:59 pm

Can someone please post the procedure for CentOS 6.5 too ?

I tired to install but I'm getting confilicts

Code: Select all

Transaction Check Error:
  file /etc/my.cnf from install of MariaDB-common-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/czech/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/danish/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/dutch/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/english/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/estonian/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64

DevilStar
Posts: 44
Joined: Tue Sep 09, 2014 8:10 am

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby DevilStar » Sun Sep 14, 2014 4:36 am

Tutorial does not work with Debian 7.

Code: Select all

root@devilstar:~# lsb_release -a
Distributor ID: Debian
Description:    Debian GNU/Linux 7.6 (wheezy)
Release:        7.6
Codename:       wheezy
root@devilstar:~# uname -a
Linux devilstar 3.2.41-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 x86_64 GNU/Linux
root@devilstar:~# apt-get update
Hit http://mirror.stshosting.co.uk wheezy Release.gpg
Hit http://mirror.stshosting.co.uk wheezy Release
Hit http://packages.dotdeb.org wheezy Release.gpg
Hit http://packages.dotdeb.org wheezy-php55 Release.gpg
Hit http://mirror.stshosting.co.uk wheezy/main Sources
Hit http://mirror.stshosting.co.uk wheezy/main amd64 Packages
Hit http://packages.dotdeb.org wheezy Release
Hit http://mirror.stshosting.co.uk wheezy/main i386 Packages
Hit http://packages.dotdeb.org wheezy-php55 Release
Hit http://packages.dotdeb.org wheezy/all Sources
Hit http://packages.dotdeb.org wheezy/all amd64 Packages
Ign http://mirror.stshosting.co.uk wheezy/main Translation-en
Hit http://packages.dotdeb.org wheezy/all i386 Packages
Hit http://packages.dotdeb.org wheezy-php55/all Sources
Hit http://packages.dotdeb.org wheezy-php55/all amd64 Packages
Hit http://packages.dotdeb.org wheezy-php55/all i386 Packages
Hit http://ftp.debian.org wheezy Release.gpg
Hit http://ftp.debian.org wheezy Release
Hit http://ftp.debian.org wheezy/main amd64 Packages
Hit http://ftp.debian.org wheezy/contrib amd64 Packages
Hit http://ftp.debian.org wheezy/non-free amd64 Packages
Hit http://ftp.debian.org wheezy/main i386 Packages
Hit http://ftp.debian.org wheezy/contrib i386 Packages
Hit http://ftp.debian.org wheezy/non-free i386 Packages
Hit http://ftp.debian.org wheezy/contrib Translation-en
Hit http://ftp.debian.org wheezy/main Translation-en
Hit http://ftp.debian.org wheezy/non-free Translation-en
Ign http://packages.dotdeb.org wheezy/all Translation-en
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release
Ign http://packages.dotdeb.org wheezy-php55/all Translation-en
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://apt.vestacp.com wheezy Release.gpg
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages
Hit http://security.debian.org wheezy/updates/main i386 Packages
Hit http://nginx.org wheezy Release.gpg
Hit http://apt.vestacp.com wheezy Release
Hit http://security.debian.org wheezy/updates/contrib i386 Packages
Hit http://security.debian.org wheezy/updates/non-free i386 Packages
Hit http://security.debian.org wheezy/updates/contrib Translation-en
Hit http://apt.vestacp.com wheezy/vesta amd64 Packages
Hit http://security.debian.org wheezy/updates/main Translation-en
Hit http://nginx.org wheezy Release
Hit http://security.debian.org wheezy/updates/non-free Translation-en
Hit http://apt.vestacp.com wheezy/vesta i386 Packages
Hit http://nginx.org wheezy/nginx amd64 Packages
Hit http://nginx.org wheezy/nginx i386 Packages
Ign http://apt.vestacp.com wheezy/vesta Translation-en
Ign http://nginx.org wheezy/nginx Translation-en
Reading package lists... Done
root@devilstar:~# apt-get install  mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.0 (= 10.0.13+maria-1~wheezy) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@devilstar:~#

DevilStar
Posts: 44
Joined: Tue Sep 09, 2014 8:10 am

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby DevilStar » Sun Sep 14, 2014 7:10 am

Pinning the priority also didn't help.

But here is a solution (very-very rude solution):

Code: Select all

$ apt-get purge mysql* mariadb*
$ apt-get install mariadb-server

and

Code: Select all

$ apt-get install phpmyadmin


Do not forget to save configurations during purge process.

As a result i have fully working mariadb without any data loss.

mephivio
Posts: 157
Joined: Thu Mar 27, 2014 7:35 am
Location: France

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby mephivio » Sat Oct 11, 2014 1:16 pm

take care : it has broken my distrib

Demeter
Posts: 24
Joined: Mon Dec 01, 2014 2:14 pm

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby Demeter » Mon Dec 08, 2014 11:44 am

After changing MySQL to MariaDB 10 in phpinfo mysqli section I see:

Code: Select all

Client API library version    10.0.15-MariaDB
Client API header version    5.5.38


So, is it normally to work with different API header and library versions or this may couses any problems?
(Debian 7.7, php 5.4.35)

mehargags
Moderators
Posts: 743
Joined: Sat Sep 06, 2014 9:58 pm

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby mehargags » Mon Dec 08, 2014 4:17 pm

Yes it is OK...

after upgrade you may need to reset mysql root password again to connect Maridb with PHP properly.

Also install and switch to native Driver for Mysql to supress the mismatch warning

# apt-get install php5-mysqlnd

aksint
Posts: 6
Joined: Thu Jan 22, 2015 8:53 pm

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby aksint » Thu Jan 22, 2015 10:38 pm

mehargags wrote:Can someone please post the procedure for CentOS 6.5 too ?

I tired to install but I'm getting confilicts

Code: Select all

Transaction Check Error:
  file /etc/my.cnf from install of MariaDB-common-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/czech/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/danish/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/dutch/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/english/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64
  file /usr/share/mysql/estonian/errmsg.sys from install of MariaDB-server-10.1.0-1.el6.x86_64 conflicts with file from package mysql-libs-5.5.39-1.el6.remi.x86_64



I have made scripts to replace MySQL with MariaDB Galera cluster in VestaCP
I have only tested it with CentOS 6.6 minimal install though, but don't expect a difference in it.

The scripts will remove MySQL without removing phpMyAdmin and will fix the roundcube tables
These scripts are only for a clean install. If you already have data in the tables I can't be sure if it will be restored correctly.

You do have to manually open tcp ports 22, 3306, 4444 and 4567 if they are not open yet
I tried with the iptables command, but it doesn't seem to save the rules :S

http://aksint.nl/mdbcluster.zip

I hope this will help :)

mehargags
Moderators
Posts: 743
Joined: Sat Sep 06, 2014 9:58 pm

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby mehargags » Fri Jan 23, 2015 8:18 am

Thanks Alot... I will try and post results.

infact I was going to develop scripts for ubuntu/Debian shortly, can you share if you already have for these distro's ?

aksint
Posts: 6
Joined: Thu Jan 22, 2015 8:53 pm

Re: Setting Up MariaDB 10.0 (Debain Instructions)

Postby aksint » Fri Jan 23, 2015 12:16 pm

I don't have experience with other distro's unfortunately.
Won't most commands be almost the same?


Return to “Database Server”



Who is online

Users browsing this forum: No registered users and 5 guests

cron