Skip to content
Dr. M H B Ariyaratne edited this page Jul 27, 2019 · 3 revisions

Secure MySQL\MariaDB

Secure MySQL\MariaDB access with the following command. Follow defaults.

sudo mysql_secure_installation

Then log as the su

sudo mysql

You will get the MySQL command prompt. Create a new user and grant all privileges as below. Then grant all privileges as below.

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';

Clone this wiki locally