JakartaJEEWebDevelopment

Jakarta JEE8 Enterprise Web Development

View on GitHub

4. How to Prepare a Relational Database (MariaDB)

Adding Windows Configuration and Setup for MariaDB

Step-by-Step Guide for Installing MariaDB on Windows 10


1. Download the Latest Stable MariaDB Release


2. Download the MSI Installer


3. Run the MSI Installer

  1. Locate the downloaded .msi file in Windows Explorer.
  2. Double-click the file to begin the installation process.
  3. Follow the Installation Wizard:
    • Choose the installation directory (default: C:\Program Files\MariaDB 10.x).
    • Set up a root password when prompted (important for database security).
    • Optionally enable the MariaDB service to start automatically on system boot.
    • Select the features to install (default selections are usually sufficient).

4. Verify the Installation via Command Line

After installation, confirm that MariaDB is correctly installed and running:

  1. Open the Command Prompt (cmd) as Administrator.
  2. Verify MariaDB service status:
    sc query mysql
    
    • If MariaDB is running, you will see “RUNNING” under STATE.
  3. Log in to MariaDB:
    mysql -u root -p
    
    • Enter the root password you set during installation.
    • You should now see the MariaDB command prompt.
  4. Check the installed version:
    SELECT VERSION();
    
  5. Create a test database:
    CREATE DATABASE test_db;
    USE test_db;
    SHOW TABLES;
    

5. Additional Configuration

If necessary, update configuration files for custom settings:

Add or modify configurations as needed:

[mysqld]
port=3306
bind-address=127.0.0.1

6. Troubleshooting


This additional setup steps are for Linux and other Unix based systems