How To Mariadb Create Database and User Account on a Unix/Linux Based Server

Fig.06: Creating users and database on the MariaDB server

Fig.06: Creating users and database on the MariaDB server

Login as root on the MariaDB server:

mysql -u root -p

The sql syntax is as follows to create database named wpblog:

CREATE DATABASE wpblog;

The sql syntax is as follows to create a user named wpuser for a db called wpblog with a password called ‘foobar’. The following will also grant wpuser full rights:

GRANT ALL ON wpblog.* TO wpuser@localhost IDENTIFIED BY 'foobar';

Exit from the mysql client and connect as follows to create tables:

mysql -u wpuser -p wpblog

Examples and usage: How To Install MariaDB Databases on a FreeBSD v10/11 Unix Server

4 comment

    Have a question? Post it on our forum!