Difference between revisions of "MariaDB"

From ArchWiki
Jump to: navigation, search
(Organised systemd/sysvinit sections)
Line 17: Line 17:
 
{{Note| If you experience errors or you want more information about it, read the official [[http://kb.askmonty.org/v/installing-system-tables-mysql_install_db documentation]]}}
 
{{Note| If you experience errors or you want more information about it, read the official [[http://kb.askmonty.org/v/installing-system-tables-mysql_install_db documentation]]}}
  
Now you should be able to start/stop the server
+
==== On a systemd system ====
# /etc/rc.d/mysqld start
 
  
In the updated arch instalation with systemd:
+
To start the mariadb daemon:
  
 
  # systemctl start mysqld.service
 
  # systemctl start mysqld.service
  
It is recommended to secure the installation, using the provided tool:
+
To enable it on every boot:
  # mysql_secure_installation
+
 
 +
  # systemctl enable mysqld.service
 +
 
 +
==== On a sysvinit system ====
 +
 
 +
Similarly, to start:
  
To start MariaDB automatically at boot, edit /etc/rc.conf and add the mysqld daemon:
+
# /etc/rc.d/mysqld start
# DAEMONS=(... mysqld ...)
 
  
Or if using [[systemd]], mariadb >= 5.5.25-3 has a service unit:
+
And/or place it in the daemons array in {{ic|/etc/rc.conf}}:
# systemctl enable mysqld.service
 
  
Note that the original MySQL might not provide this service if you ever decide to revert to it.
+
DAEMONS=(... mysqld ...)
  
 
== Configuration ==
 
== Configuration ==
  
If you are new to MySQL, read first the [[MySQL]] page on this wiki.
+
It is '''highly recommended''' to secure the installation after starting the daemon, using the provided tool:
 +
# mysql_secure_installation
 +
 
 +
If you are new to MySQL, please read the [[MySQL]] page on this wiki for additional information.

Revision as of 10:42, 2 January 2013

MariaDB is a reliable, high performance and full-featured database server which aims to be an 'always Free, backward compatible, drop-in' replacement of the MySQL Server. It is distributed under the GPLv2 license.

Started as a fork of MySQL by Widenius (creator of both servers), MariaDB is a project developed by the open source community under the technocracy model. Monty Program Ab, who employees most of the original core MySQL developers, is currently the main steward for the project.

MariaDB is kept up to date with the latest MySQL release from the same branch. A merge from the main MySQL branch is done for every new MySQL release or when there is some critical bugfix applied to the main branch.

The intent also being to maintain high fidelity with MySQL, ensuring a "drop-in" replacement capability with library binary equivalency and exacting matching with MySQL APIs and commands.

Installation

Without having MySQL installed

Install the mariadb package from the community repository.

After installing, the mysql system tables should be installed for you automatically. If not, this should reinstall them:

# /usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Note: If you experience errors or you want more information about it, read the official [documentation]

On a systemd system

To start the mariadb daemon:

# systemctl start mysqld.service

To enable it on every boot:

# systemctl enable mysqld.service

On a sysvinit system

Similarly, to start:

# /etc/rc.d/mysqld start

And/or place it in the daemons array in /etc/rc.conf:

DAEMONS=(... mysqld ...)

Configuration

It is highly recommended to secure the installation after starting the daemon, using the provided tool:

# mysql_secure_installation

If you are new to MySQL, please read the MySQL page on this wiki for additional information.