How to configure Mysql root password on Oracle Linux 8
- Login to your server as root.
- By default, there is no password for mysql root.
- mysql -u root -p
- Alter user 'root'@'localhost' identified WITH mysql_native_password by 'StrongPassword';
- flush privileges;
- exit;
Now, try to connect to Mysql as root user. It works!