How to Install MariaDB on Windows Server 2019 (Tutorial)

How to Install MariaDB on Windows Server 2019.  MariaDB Server is a free, open-source and one of the most popular relational database management systems. It is developed by the original developers of MySQL under the General Public License version 2. Compared to MySQL, MariaDB shows improved speed and offers better performance. MariaDB Server began with version 5.1 and carried the same code base as MySQL. It is written C, C++, Bash, and Perl, and it can be easily integrated with other RDBMS.

MariaDB Features

  • Offers better query execution and is great for large data sets.
  • Supports a larger open-source code.
  • Support more than 200,000 connections.
  • Supports more storage engines compared to MySQL.

In this guide, we will show you how to install the MariaDB database server on Windows Server 2019.  Alternately check out MariaDB Windows Cloud to install on Azure, AWS or Google GCP.

Download MariaDB for Windows Server

First, go to the MariaDB download page. You should see the following screen. 

Click on the Download button. You will be prompted to select the appropriate file for your operating system as shown below:

Select the MariaDB MSI package and download it to your system. Once the MariaDB MSI package file is downloaded. You can proceed to install the MariaDB to your system.

Install MariaDB on Windows Server 2019

Now, double click on the downloaded MSI file to start the MariaDB installation. You will be redirected to the MariaDB welcome page:

Click on the Next button. You should see the MariaDB license agreement page:

Accept the License agreement and click on the Next button. You should see the MariaDB custom setup page:

Click on the Next button. You should see the MariaDB root password set page:

Set your root password and click on the Next button. You should see the MariaDB instance property page:

Define your prefered options and click on the Next button. You should see the MariaDB ready to install page:

Click on the Install button to start the MariaDB installation. Once the MariaDB has been installed, you should see the following page:

Click on the Finish button to finish the installation.

 

At this point, MariaDB is installed on your server. You can now proceed to connect to the MariaDB server.

Create MariaDB Database and User

In this section, we will show you how to connect to the MariaDB server and create MariaDB Database.

To access the MariaDB client, click on the start menu. You should see the following page:

Now, click on the MySQL Client to access the MariaDB. You will be asked to provide the MariaDB root password. After providing the MariaDB root password. You should see the MariaDB interface in the following page:

To create a database called windowsdb, run the following command:

				
					MariaDB [(none)]> create database windowsdb;
				
			

To create a user called windowsuser and set a password, run the following command:

				
					MariaDB [(none)]> create user windowsuser@localhost identified by 'password';
				
			

To list all MariaDB users, run the following command:

				
					MariaDB [(none)]> select user from mysql.user;
				
			

You should get the following output:

				
					+-------------+
| User        |
+-------------+
| root        |
| root        |
| root        |
| mariadb.sys |
| root        |
| windowsuser |
+-------------+
6 rows in set (0.982 sec)
				
			

To list all databases, run the following command:

				
					MariaDB [(none)]> show databases;
				
			

You should get the following output:

				
					+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| windowsdb          |
+--------------------+
5 rows in set (0.976 sec)
				
			

To grant all the privileges to the windowsdb, run the following command:

				
					MariaDB [(none)]> GRANT ALL PRIVILEGES ON windowsdb.* TO windowsuser@localhost IDENTIFIED BY 'password';
				
			

To display all granted privileges, run the following command:

				
					MariaDB [(none)]> SHOW GRANTS FOR windowsuser@localhost;
				
			

You should get the following output:

				
					+--------------------------------------------------------------------------------------------------------------------+
| Grants for windowsuser@localhost                                                                                   |
+--------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `windowsuser`@`localhost` IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' |
| GRANT ALL PRIVILEGES ON `windowsdb`.* TO `windowsuser`@`localhost`                                                 |
+--------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.007 sec)

				
			

To change the password of windowsuser, run the following command:

				
					MariaDB [(none)]> set password for windowsuser@localhost = password('newpass');
				
			

To delete a MariaDB user, run the following command:

				
					MariaDB [(none)]> drop user windowsuser@localhost;
				
			

To delete a MariaDB database, run the following command:

				
					MariaDB [(none)]> drop database windowsdb;
				
			

To check the MariaDB version, run the following command:

				
					MariaDB [(none)]> select version();
				
			

You should get the MariaDB version in the following output:

				
					+----------------+
| version()      |
+----------------+
| 10.6.4-MariaDB |
+----------------+
1 row in set (0.013 sec)
				
			

You can see the MariaDB help information using the following command:

				
					MariaDB [(none)]> help
				
			

You should see the following output:

				
					General information about MariaDB can be found at
http://mariadb.org

List of all client commands:
Note that all text commands must be first on line and end with ';'
?         (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
ego       (\G) Send command to MariaDB server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to MariaDB server.
help      (\h) Display this help.
notee     (\t) Don't write into outfile.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.

For server side help, type 'help contents'

				
			

Start and Stop MariaDB Service

You can start and stop the MariaDB service easily from the Windows service manager.

 

To open a Windows service manager, press Windows + R and type services.msc as shown below:

Then, click on the OK button to launch the Windows service manager as shown below:

You can now, search for MariaDB and start or stop the MariaDB service as per your requirement.

Uninstall MariaDB on Windows

To uninstall the MariaDB server from your Windows server system, you will need to open a Windows Control Panel:

Next, click on the Programs => Uninstall a program. You should see the following page:

Now, double click on MariaDB. You should see the MariaDB uninstall screen:

Click on the Next button. You should see the MariaDB remove screen:

Click on the Remove button. You should see the following screen:

Click on the Remove data to remove all MariaDB data. You should see the following screen:

Now, click on the Remove button to completely remove the MariaDB from your system. Once the MariaDB has been uninstalled completely. You should see the following screen:

Click on the Finish button to exit from the MariaDB console.

Install MariaDB on Windows Server 2019 Conclusion

In the above guide, we explained how to install the MariaDB database server on the Windows Server 2019. We also explained how to interact with MariaDB with examples. Finally, we also explained how to uninstall the MariaDB from your system.

Avatar for Hitesh Jethva
Hitesh Jethva

I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x