To install MariaDB on CentOS Stream 9, follow these steps:
Step 1 : Start by updating the system packages to ensure you have the latest information about available software.
Step 2 : Install MariaDB
Step 3 : After installation, start the MariaDB service and enable it to start on boot.
Step 4 : Secure your MariaDB installation by running the following command:
Follow the prompts to enhance security:
- Enter the root password (leave it blank if not set).
- 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 the test database and access to it - choose 'y'.
- Reload privilege tables now - choose 'y'.
Step 5 : Confirm the status of the MariaDB service to ensure it is running without issues.
Step 6 :Access the MariaDB shell to interact with the database.
Step 7 : Create Admin and Grant Privileges
Within the MariaDB shell, create an administrative user and grant necessary privileges.
Congratulations! You have successfully installed MariaDB on CentOS Stream 9.