How to Install MariaDB 10.0 on Ubuntu 14.10, 14.04 & 12.04 LTS
MariaDB ia an enhanced, drop-in replacement for MySQL. MariaDB can be a better choice for choice for database professionals looking for a robust, scalable, and reliable SQL server. MariaDB has a number of updated features over MySQL. Use below links to read features comparison between MariaDB and MySQL
This article will help you to install MariaDB 10.0 in Ubuntu 14.10, 14.04 LTS and 12.04 LTS and Other Systems using apt-get package manager.
Step 1: Add MariaDB Apt-get Repositories
First we need to add MariaDB apt-get repository in our system. Before adding repository make sure you have required package install and also add apt-get key for Mariadb repository using following command
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
Now use one of followings option as per your Ubuntu version. To check your Ubuntu system version run ‘lsb-release -a’ command.
For Ubuntu 14.10 “utopic”
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/10.0/ubuntu utopic main'
For Ubuntu 14.04 “trusty”
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/10.0/ubuntu trusty main'
For Ubuntu 12.04 LTS “precise”
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/10.0/ubuntu precise main'
For Other Ubuntu Versions
For other versions of Ubuntu. Click here to find suitable repository for your system.
Step 2: Install MariaDB in Ubuntu
After adding repository in your system and use following commands to install MariaDB on your system.
$ sudo apt-get update $ sudo apt-get install mariadb-server
While installing MariaDB using above command installer will prompt for MariaDB root account password twice like below snapshot.
Step 3: Login To MariaDB
After completing installation you can connect to MariaDB using following command.
#mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 42 Server version: 10.0.15-MariaDB-1~precise-log mariadb.org binary distribution Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
Step 4: Start/Stop MariaDB Service
Some times we need to stop or start MariaDB service. Use the following commands to stop/stop it.
$ sudo /etc/init.d/mysql stop $ sudo /etc/init.d/mysql start
Step 5: 보안설정을 위한 쉘 실행
$ sudo /usr/bin/mysql_secure_installation