
How to Install Mariadb on Ubuntu and Connect Ruby on Rails?
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. It is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle – Wikipedia
Install MariaDB (on 14.04.4 LTS (Trusty Tahr))
Installation is super easy. Execute the following command in your terminal, one by one in sequence:
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db $ sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main' $ sudo apt-get update $ sudo apt-get install mariadb-server
Checkout MariaDB Download page to find instructions to install for different linux distros.
Configure Rails
First you have to install client libraries to connect to MariaDB
$ sudo apt-get install libmariadbd-dev
Now add mysql2 gem
to the Gemfile
run bundle install.
Next you will have to configure database.yml which will look like
development: adapter: mysql2 encoding: utf8 pool: 5 min_messages: warning timeout: 5000 username: root password: root socket: /var/run/mysqld/mysqld.sock
The username and password in above configuration is the one that you configure while installing MariaDB.
That’s all. Now restart your rails server and start over!
Click here for more details…
At BoTree Technologies, we build enterprise applications with our RoR team of 25+ engineers.
We also specialize in RPA, AI, Python, Django, JavaScript and ReactJS.
Consulting is free – let us help you grow!
