Project

General

Profile

Support #945

Install MariaDB 10 on Arch Linux

Added by Daniel Curtis 9 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Database Server
Target version:
Start date:
01/06/2019
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

This is a simple guide on setting up a MariaDB 10 server on Arch Linux.

Prepare the Environment

  • Make sure the system is up to date:
    pacman -Syu
    

Install MariaDB server

  • Start by installing the mariadb server and mariadb-clients packages:
    pacman -S mariadb{,-clients}
    
  • Initialize the database:
    mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    
  • Enable and start MariaDB
    systemctl enable mariadb
    systemctl start mariadb
    
  • Prepare the database for use by running the secure installation:
    mysql_secure_installation
    
    • NOTE: Choose a strong root password and answer yes to all questions.

Create MariaDB Databases and Users

  • Login to MariaDB and create appropriate databases and users.
    mysql -u root -p
    
    • and run the following SQL queries to create the somedb database and someuser user:
      CREATE DATABASE somedb CHARACTER SET utf8;
      
      CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'SuperSecretPassword';
      
      GRANT ALL PRIVILEGES ON somedb.* TO 'someuser'@'localhost';
      
      FLUSH PRIVILEGES;
      
      quit
      

History

#1 Updated by Daniel Curtis 9 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved
  • Description updated (diff)

#2 Updated by Daniel Curtis 4 months ago

  • Status changed from Resolved to Rejected

#3 Updated by Daniel Curtis 4 months ago

  • Status changed from Rejected to Resolved

Also available in: Atom PDF