Project

General

Profile

Support #788

Install MariaDB 10 on FreeBSD

Added by Daniel Curtis over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database Server
Target version:
Start date:
04/03/2016
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 FreeBSD 10.

Prepare the Environment

  • Make sure the system is up to date:
    pkg update && pkg upgrade
    

Install MariaDB server

  • Start by installing the mariadb100-server and mariadb100-client packages:
    pkg install mariadb100-{server,client}
    
  • Copy a base MariaDB configuration to use:
    cp /usr/local/share/mysql/my-small.cnf /var/db/mysql/my.cnf
    
  • Edit the mariadb config to change the max packet size:
    vi /var/db/mysql/my.cnf
    
    • and modify max_allowed_packet to 32M
      max_allowed_packet = 32M
      
  • Enable and start MariaDB
    echo 'mysql_enable="YES"' >> /etc/rc.conf
    service mysql-server start
    
  • 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 over 4 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#2 Updated by Daniel Curtis over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF