Two all-privilege accounts were created. One is root@localhost, it has no password, but you need to be system 'root' user to connect. Use, for example, sudo mysql The second is mysql@localhost, it has no password either, but you need to be the system 'mysql' user to connect. After connecting you can set the password, if you would need to be able to connect as any of these users with a password and without sudo
Mysql; Use mysql; Delete from user where user=''; flush privileges; set password for root@'localhost'=password('redhat'); set password for mysql@‘ocalhost'=password('redhat'); grant all privileges on *.* to username@'%' identified by 'pass'; Exit UPDATE mysql.user SET authentication_string = PASSWORD("pass"), plugin = 'mysql_native_password' WHERE User = 'root' AND Host = 'localhost';
https://dev.mysql.com/downloads/mysql/ Select Operating System: Red Hat Enterprise Linux / Oracle Linux Select OS Version: Red Hat Enterprise Linux7 /Oracle Linux7 (x86,64-bit)