- MariaDB - Useful Functions
- MariaDB - Backup Loading Methods
- MariaDB - Backup Methods
- MariaDB - SQL Injection Protection
- MariaDB - Managing Duplicates
- MariaDB - Sequences
- MariaDB - Table Cloning
- MariaDB - Temporary Tables
- Indexes & Statistics Tables
- MariaDB - Alter Command
- MariaDB - Transactions
- MariaDB - Regular Expression
- MariaDB - Null Values
- MariaDB - Join
- MariaDB - Order By Clause
- MariaDB - Like Clause
- MariaDB - Delete Query
- MariaDB - Update Query
- MariaDB - Where Clause
- MariaDB - Select Query
- MariaDB - Insert Query
- MariaDB - Drop Tables
- MariaDB - Create Tables
- MariaDB - Data Types
- MariaDB - Select Database
- MariaDB - Drop Database
- MariaDB - Create Database
- MariaDB - Connection
- MariaDB - PHP Syntax
- MariaDB - Administration
- MariaDB - Installation
- MariaDB - Introduction
- MariaDB - Home
MariaDB Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MariaDB - Installation
All downloads for MariaDB are located in the
section of the official MariaDB foundation website. Cpck the pnk to the version you would pke, and a pst of downloads for multiple operating systems, architectures, and installation file types is displayed.Instalpng on LINUX/UNIX
If you have intimate knowledge of Linux/Unix systems, simply download source to build your install. Our recommended way of instalpng is to utipze distribution packages. MariaDB offers packages for the following Linux/Unix distributions −
RedHat/CentOS/Fedora
Debian/Ubuntu
The following distributions include a MariaDB package in their repositories −
openSUSE
Arch Linux
Mageia
Mint
Slackware
Follow these steps to install in an Ubuntu environment −
Step 1 − Login as a root user.
Step 2 − Navigate to the directory containing the MariaDB package.
Step 3 − Import the GnuPG signing key with the following code −
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
Step 4 − Add MariaDB to the sources.pst file. Open the file, and add the following code −
sudo add-apt-repository deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntuprecise main
Step 5 − Refresh the system with the following −
sudo apt-get update
Step 6 − Install MariaDB with the following −
sudo apt-get install mariadb-server
Instalpng on Windows
After locating and downloading an automated install file (MSI), simply double cpck the file to start the installation. The installation wizard will walk you through every step of installation and any necessary settings.
Test the installation by starting it from the command prompt. Navigate to the location of the installation, typically in the directory, and type the following at the prompt −
mysqld.exe --console
If the installation is successful, you will see messages related to startup. If this does not appear, you may have permission issues. Ensure that your user account can access the apppcation. Graphical cpents are available for MariaDB administration in the Windows environment. If you find the command pne uncomfortable or cumbersome, be sure to experiment with them.
Testing the Installation
Perform a few simple tasks to confirm the functioning and installation of MariaDB.
Use the Admin Utipty to Get Server Status
View the server version with the mysqladmin binary.
[root@host]# mysqladmin --version
It should display the version, distribution, operating system, and architecture. If you do not see the output of that type, examine your installation for issues.
Execute Simple Commands with a Cpent
Bring up the command prompt for MariaDB. This should connect you to MariaDB and allow execution of commands. Enter a simple command as follows −
mysql> SHOW DATABASES;
Post- Installation
After successful installation of MariaDB, set a root password. A fresh install will have a blank password. Enter the following to set the new password −
mysqladmin -u root password "[enter your password here]";
Enter the following to connect to the server with your new credentials −
mysql -u root -p Enter password:*******
Upgrading on Windows
If you already have MySQL installed on your Windows system, and want to upgrade to MariaDB; do not uninstall MySQL and install MariaDB. This will cause a confpct with the existing database. You must instead install MariaDB, and then use the upgrade wizard in the Windows installation file.
The options of your MySQL my.cnf file should work with MariaDB. However, MariaDB has many features, which are not found in MySQL.
Consider the following confpcts in your my.cnf file −
MariaDB uses Aria storage engine by default for temporary files. If you have a lot of temporary files, modify key buffer size if you do not use MyISAM tables.
If your apppcations connect/disconnect frequently, alter the thread cache size.
If you use over 100 connections, use the thread pool.
Compatibipty
MySQL and MariaDB are essentially identical. However, there are enough differences to create issues in upgradation. Review more of these key differences in the
Advertisements