Mysql

Posted . Visible to the public.

Mysql Secure Installation in ubuntu 18.04

sudo apt install mysql-server

enter Y to install
2.

sudo mysql_secure_installation

to run automated securing script
3. Press N for VALIDATE PASSWORD plugin
4. Set root password
5. Remove anonymous users? Y
6. Disallow root login remotely? N
7. Remove test database and access to it? Y
8. Reload privilege tables now? Y
9.

sudo mysql

to enter MySQL CLI
10.

SELECT user,authentication_string,plugin,host FROM mysql.user;

to verify root user's auth method
11.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'STRONG_PASSWORD_HERE';

to set a root password
12.

SELECT user,authentication_string,plugin,host FROM mysql.user;

to verify root user's auth method
13.

FLUSH PRIVILEGES;

to apply all changes
14.

mysql -u root -p

to access db from now on, enter password STRONG_PASSWORD_HERE

vasan
Last edit
vasan
Posted by vasan to vasan's deck (2020-05-09 16:58)