To install it on CentOS Stream 10, follow the steps below:
Step 1 : Before installing any software, ensure your system is updated by running the following commands:
Step 2 : Install the MariaDB server package by executing:
Step 3 : Start the MariaDB service and enable it to start on boot:
Step 4 : Secure MariaDB
- Run the MariaDB security script to enhance its security:
- Enter current root password: Press Enter (leave it blank if not set).
- Switch to unix_socket authentication: Type y
and press Enter.
- Change the root password: Type y
and press Enter, then set a secure password.
- Change the root password - choose 'y'.
- Remove anonymous users: Type y
and press Enter.
- Disallow root login remotely: Type y
and press Enter.
- Remove test database and access to it: Type y
and press Enter.
- Reload privilege tables now: Type y
and press Enter.
Step 5 : Verify that MariaDB is running:
Step 6 : Log in to the MariaDB shell using the root account:
Step 7 : Inside the MariaDB shell, create a new administrative user and grant all privileges:
Replace your_password
with a strong password.
Exit the MariaDB shell:
Congratulations! You have successfully installed and secured MariaDB on CentOS Stream 10.