Step 1: Update the System
Before installing MariaDB, it’s a good practice to update your system’s package list and upgrade existing packages to their latest versions. Open a terminal and run the following commands:Step 2: Install MariaDB
Once your system is up to date, you can install MariaDB using the package manager. For Ubuntu or Debian-based systems, use the following command:Step 3: Secure MariaDB Installation
After installation, it’s crucial to secure your MariaDB installation. Run the following command to start the security script:Step 4: Start and Enable MariaDB Service
To ensure that MariaDB starts automatically at boot, you can enable the service with the following command:Step 5: Access MariaDB
You can access the MariaDB server using the MySQL client. To log in as the root user, run:Step 6: Create a New Database and User (Optional)
If you need to create a new database and user, you can do so using the following SQL commands:Congratulations! You have successfully set up MariaDB on your Linux Server. You can now start using it to manage your databases.