To install MariaDB on Ubuntu 24.04, follow these steps:
Step 1 : Ensure your package lists are up-to-date by running:
Step 2 : Install MariaDB by running:
Step 3 : Secure the MariaDB installation by running:
Follow the prompts to secure MariaDB:
- Enter root password (leave blank if not set yet).
- Switch to unix_socket authentication: Choose 'Y'.
- Change the root password: Choose 'Y'.
- Remove anonymous users: Choose 'Y'.
- Disallow root login remotely: Choose 'Y'.
- Remove test database and access to it: Choose 'Y'.
- Reload privilege tables now: Choose 'Y'.
Step 4 : Start and enable MariaDB to run on system boot:
Step 5 : Check the status of MariaDB to ensure it's running without issues:
Step 6 : Access the MariaDB shell:
Step 7 : Create an admin user and grant necessary privileges. Replace 'admin' and 'password' with your desired username and password:
Congratulations! You have successfully installed and secured MariaDB on Ubuntu 24.04.