How can I use MariaDB instead of MySQL in my Rails project?
When I try to install mysql2 gem it returns error,because mysqlclient was not found.
Here some solution, but I didn't found any libmariadbd-dev package on my openSUSE 12.3.
How can I use MariaDB instead of MySQL in my Rails project?
When I try to install mysql2 gem it returns error,because mysqlclient was not found.
Here some solution, but I didn't found any libmariadbd-dev package on my openSUSE 12.3.
For recent ubuntu 15.04 vivid and Debian 8.0 Jessie:
No need to install from a ppa (
mariadb-server
is included), but you have to installlibmariadb-client-lgpl-dev
andlibmariadb-client-lgpl-dev-compat
and configure the gem to usemariadb_config
:As of Rails 5 (currently still in beta), MariaDB is officially supported, which I think should ease the implementation. Although I haven't tried it myself.
You can read about it in the blogpost on the Rails weblog:
http://weblog.rubyonrails.org/2016/4/16/this-week-in-rails-mariadb-action-cable-and-more/
Probably you are getting error related with mariadb_config. Something like
You just need to go to /usr/bin directory and run this command
This will solve your problem.
It doesn't look like openSUSE has a MariaDB client development package. You must install the libmysqlclient-devel package package. Since MariaDB is tagged as a drop in replacement for MySQL, it would have to support the MySQL clients, though you may lose tiny bits of MariaDB improvements.
It appears that the mysql2 gem should function with the MariaDB client libraries. Other options are hoping the mariadb-client package is enough, find a 3rd party package for the libraries or installing them yourself.
Update There is now an MariaDB repository for openSUSE. It includes a development package, and very good instructions. Place the following in a file under /etc/zypp/repos.d/
Now you can run
zypper install MariaDB-client MariaDB-devel
Your question isn't about Ubuntu, but I'm sure a lot of people Googling Ubuntu (or its derivatives like Mint) will land on this page. In Ubuntu, you have to install all the packages using the MariaDB Foundation's ppa, but they include all the development libraries and support the 5.5, 10.0 and 10.1 releases. Then you can install packages such as
mariadb-server
,mariadb-client
,libmariadbclient-dev
, andlibmariadbclient-dev:i386
(32-bit client).The instructions are simple and detailed on the site. For example, installing just the 10.1 dev libraries in Ubuntu 14.04
In
Ubuntu 14.04.3 LTS
I am able to install withsudo apt-get install libmariadbd-dev
I followed https://mariadb.com/kb/en/mariadb/installing-mariadb-deb-files/ to install MariaDB which adds apt repository for maria db.
On linux mint, I was able to install:
sudo aptitude install libmariadbclient-dev:i386 libmariadbclient-dev