Quickstart Guide: Installing MariaDB Server
This guide provides step-by-step instructions for installing MariaDB Server on various operating systems, including package updates and security settings.
The most common way to install MariaDB on Linux is through your system's package manager.
Steps:
Update Package List:
Before installing, it's a good practice to update your package index.
For Debian/Ubuntu:Bash
For Red Hat/CentOS/Fedora:Bash
Install MariaDB Server:
Install the MariaDB server and client packages.
For Debian/Ubuntu:Bash
For Red Hat/CentOS/Fedora:Bash
Secure the Installation:
After installation, run the security script to set a root password, remove anonymous users, and disable remote root login.
Follow the prompts to configure your security settings.
Start and Verify the Service:
MariaDB typically starts automatically after installation. You can check its status and manually start it if needed.
Check status:
Start service (if not running):Bash
Verify installation by connecting as root:Bash
For Windows, MariaDB provides an .msi installer for a straightforward graphical installation.
Steps:
Download MariaDB:
Visit the MariaDB downloads page to get the latest .msi installer.
Run the Installer:
Double-click the downloaded .msi file to start the installation wizard.
Follow On-Screen Instructions:
Firewall: Ensure your firewall is configured to allow connections to MariaDB on the appropriate port (default 3306) if you need remote access.
Root Password: Always set a strong root password during the secure installation step.
Further Configuration: For production environments, you may need to adjust further settings in the MariaDB configuration files (e.g., my.cnf on Linux).
Accepting the end-user license agreement.
Selecting features and the installation directory.
Setting a password for the root user.
Configuring MariaDB as a service and setting the port (default is 3306).
Optionally, enabling UTF8 as the default server character set.
sudo apt updatesudo yum update # For older systems
sudo dnf update # For newer systemssudo apt install mariadb-server mariadb-client galera-4sudo dnf install mariadb mariadb-serversudo mariadb-secure-installationsudo systemctl status mariadbsudo systemctl start mariadbmariadb -u root -p