Secure your MariaDB installation with these essential steps
Initial Command: sudo mysql_secure_installation๐ Security Recommendations
- Always run this script on production servers
- Unix socket authentication is recommended over password authentication
- Remove test databases and anonymous users in production environments
- Disable remote root access for better security
Start Security Installation
Command: sudo mysql_secure_installation
Initialize the MariaDB security script
Root Password Check
Prompt: Enter current password for root (enter for none):
Response: [Press Enter - no password]
Pressed Enter since no root password was previously set
Unix Socket Authentication
Prompt: Switch to unix_socket authentication [Y/n]
Response: Y
Enable unix_socket authentication for better security
Change Root Password
Prompt: Change the root password? [Y/n]
Response: N
Chose not to change the root password since unix_socket authentication will be used instead
Remove Anonymous Users
Prompt: Remove anonymous users? [Y/n]
Response: Y
Remove anonymous user accounts for security
Disable Remote Root Login
Prompt: Disallow root login remotely? [Y/n]
Response: Y
Prevent root login from remote connections
Remove Test Database
Prompt: Remove test database and access to it? [Y/n]
Response: Y
Delete the default test database
Reload Privilege Tables
Prompt: Reload privilege tables now? [Y/n]
Response: Y
Apply all security changes immediately
๐ Installation Complete!
Your MariaDB installation is now secure and ready for production use.
Thanks for using MariaDB!
Generated on 2026-06-26 06:19:28 | MariaDB Security Configuration Reference