LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Monday, October 21, 2024

Securing MySQL/MariaDB Server

0 comments
When setting up MySQL or MariaDB, securing the root user and the server itself is crucial. Here's a quick guide to enhancing security:

Log in as root:

sudo mysql -uroot -p

Switch to the MySQL database:

use mysql;

Disable the authentication plugin for the root user:

update user set plugin='' where user='root';
flush privileges;
quit;

Run the MySQL security script to strengthen security:

sudo mysql_secure_installation

This process improves server security by configuring password policies and removing unsafe defaults.

No comments:

Post a Comment