Software Development

How to Install Maria DB, create Database and Execute Queries

Hello Friends,

In this tutorial,we will see :

1. How to Install Maria DB
2. How to connect to Maria DB,Create Database and Execute Queries

1. How to Install Maria DB

Go to following link and click on “Download 10.4.12 Stable Now!” button.
As of writing this post,latest stable release of Maria DB is 10.4.12.Please check for latest stable release when you  are downloading.


Download the installer for maria db by clicking and saving “mariadb-10.4.12-win64.msi”  on your local drive.


 Double click on Installer file and it will start Installation Wizard.


Click on Next and you will see following screen.Click on checkbox to accept Licences Agreement.


Click on Next and you will see following screen:

Here you can see :-  It needs at least 147 MB of memory to install this software-  List of items which will be installed-  Software will  be installed at C:\Program Files\MariaDB 10.4\ .You can change this location if you want.- HeidiSQL is a GUI using which you can access Maria DB easily like we we have SQL Developer or Toad.


Click on Next and you will see following screen :

Enter username and password ,whatever you want for the root user.You will  need this later for logging into database.So enter the password which you can remember.

Click on Next and you will see following screen.Here we can see that
 – Maria DB will be Installed as a Service
 – Maria DB will be accessible on port 3306
 – DB engine used is Innodb


Click on Next and you will see following screen :

Click on Next and you will see following screen :

Click on Install and it will start installing Maria DB on your machine.

Once installation is finished, you will see following screen :

Just click on Finish,which means your installation is done.

2. How to connect to Maria DB,Create Database and Execute Queries

There are multiple ways you can connect with Maria DB like 
2.1 Using HeidiSQL  2.2 Using MySQL Client Note : Both of these comes with the installation of Maria DB itself ,so you dont need to installanything separately.

2.1 Using HeidiSQL

2.1.1         You will find Icon of HeidiSQL on your Desktop like below :

If you don’t see above Icon then you can go to Start -> Search and type HeidiSQL and  select HeidiSQL you will see following :


Click on New and you will see following screen :


Enter password which you entered during installation


Click on Open and you will see GUI to work with Maria DB:


Now,you can create new database and execute queries as below :


USE mydatabase;

CREATE TABLE student(id INT, NAME CHAR(15));

INSERT INTO student(id, NAME) VALUES(101, "Gaurav");

SELECT  * FROM student;


Using MySQL Client 2.2.1Go to Start -> Search, type “MySQl Client” and select “MySQL Client (Maria DB 10.4(x64))” and you will see following :


Enter your password to connect to Maria DB and hit enter and you will get connected to Maria DB as can be seen in following screen


To create new database execute following command :
create database mydatabase;


Execute following queries one by one to use mydatabase,create table,insert data and select data.

use mydatabase;

create table student(id int, name char(15));

insert into student(id, name) values(101, "Gaurav");

select * from student;


So in this tutorial,we learnt,- How we can install Maria DB- How we can connect to Maria DB using HeidiSQL and MySQL Client- How we can create database and execute queries
Thanks for reading.Please subscribe the blog for latest updates and share it with your friends.

Published on Java Code Geeks with permission by Gaurav Bhardwaj, partner at our JCG program. See the original article here: How to Install Maria DB, create Database and Execute Queries

Opinions expressed by Java Code Geeks contributors are their own.

Gaurav Bhardwaj

Gaurav has done Masters in Computer Applications(MCA) and is working in Software development field for more than 10 years in Java/J2EE technologies. He is currently working with one of top MNC. He has worked on various frameworks like Struts, Spring, Spring Boot, Angular JS, JSF, Velocity, iBatis, MyBatis, Hibernate, JUnit, Mockito, Dozzer. He likes to explore new technologies and share his thoughts by writing a technical blog. He is the founder of
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button