To install MariaDB on Debian 12, follow these steps:

1. Update Package Index

Start by updating the package index to ensure your system has the latest information on available packages.

2. Install MariaDB Server

Use the following command to install the MariaDB server and client:

3. Start and Enable MariaDB Service

Once installed, start the MariaDB service and enable it to start on boot.

4. Secure the Installation

To improve the security of your MariaDB server, run the security script:

During this process, you’ll be asked to:

  1. Set a root password.
  2. Remove anonymous users.
  3. Disallow root login remotely.
  4. Remove test databases.
  5. Reload privilege tables.

Answer each prompt based on your preferences for security.

5. Test the Installation

To verify that MariaDB is installed and running, log in to the MariaDB shell:

You should see the MariaDB shell if the installation was successful.

6. (Optional) Configure MariaDB

You can edit the MariaDB configuration file for additional settings if needed. The main configuration file is located at:

After making changes, restart MariaDB to apply them:

Your MariaDB server should now be up and running on Debian 12. Let me know if you need help with specific configurations!

Leave A Comment

Your email address will not be published. Required fields are marked *

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