Cloud Photo

Azure Data Architect | DBA

Part 2: MariaDB on Fedora 20 on a Windows Host with VirtualBox


This is the second in a series of articles on how to install Railo (ColdFusion) and MariaDB (MySQL) on a Fedora virtual machine (VM) using VirtualBox.

The first post discusses the creation of a Fedora VM.

In this post, we will cover installing MariaDB, creating a database user for Railo and a small table for the Railo user to play with.

Login to Fedora as webdev.

Open a Terminal Window
Open a Terminal Window

Open a terminal window.

Install mariaDB
Install MariaDB

Install MariaDB.

sudo yum install mariadb mariadb-server

You will be prompted for the webdev password.

Setup mariaDB
Setup MariaDB

After yum completes the install, set MariaDB to start when the VM starts.

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Login to MariaDB and set the root password, delete the anonymous user, create a railo user and a sample database.

mysql -u root
select user, host, password from mysql.user;

Set the password for each of the root logins.

set password for root@localhost=password('password');

Delete the anonymous user.

delete from mysql.user where user='';
Create Railo User
Create Railo User

Create a user for Railo to use.

create user railo@localhost identified by 'password';

Create a database to play with.

create database web_db;

Grant the Railo user access to play in the database.

grant select, insert, update, delete, create, drop, index, alter on web_db.* TO railo@localhost;
Create Sample Table and Data
Create Sample Table and Data

Create a sample table to play with.

mysql -u railo -p
use web_db;
create table employees (
id int not null auto_increment, 
namefirst varchar(32) not null, 
namelast varchar(32) not null, 
primary key (id));
insert into employees (namefirst, namelast) values ('IMA','SAMPLE');
select * from employees;

Once you have completed the MariaDB install, you may want to shutdown the VM and clone it so that you have a recovery point.

Leave a Reply