Configure MariaDB / MySQL

Configure the database

Create the database:

  1. From the command line run "mysql -u root -p"
     

    ucontrol@ubuntu:~$ mysql -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 39
    Server version: 10.2.13-0ubuntu0.12.04.1 (Ubuntu)
    
    
    Copyright (c) 2000, 2013, Oracle and/or its affiliates. All
    rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation
    and/or its affiliates. Other names may be trademarks of their
    respective owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the
    current input statement.
    
    
    
  2. Create the database instance tekwurx

    mysql> create database TekWurx7;
    Query OK, 1 row affected (0.00 sec)
    
    

Configure MYSQL / MariaDB from the CLI

The following default setting are used here :

Database Name : TekWurx7

Database user : tekwurx

Database user password : TekWurx1uControl

These however, can all be defined as required.


  1. Login to mysql 

    mysql -u root -p

    Using the root account created during install of MySQL, default root password is blank (Press enter)

  2. Create the TekWurx Database

    CREATE DATABASE TekWurx7;
  3. Create and assign privileges to the tekwurx user for the TekWurx Schema

    GRANT ALL ON TekWurx7.* TO tekwurx@'localhost' IDENTIFIED BY '<PASSWORD>';
    GRANT ALL ON TekWurx7.* TO tekwurx@'%' IDENTIFIED BY '<PASSWORD>';
  4. Logout of mysql

    exit

    Default password : TekWurx1uControl



Updates to the MySQL my.cnf file

[mysqld]
key_buffer_size = 16K
max_allowed_packet = 2G
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 240K
character-set-server = utf8

[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M