Skip to Main Content

MySQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Default credentials for "Oracle Linux Developer" Mysql

User_KN1IXJul 27 2021 — edited Jul 27 2021

Hello,
I have installed a new instance with the "Oracle Linux Developer" image. This installs MySQL Community edition 8.0. I used the Oracle provided Stack to install everything.
Normally the root login does not have a password. Although this install seems to have a password since I cannot log in with the password blank.
The documentation here does not have a solution. I have searched everywhere else too.
https://docs.oracle.com/en-us/iaas/mysql-database/doc/connecting-db-system.html#GUID-591AFFED-1181-4DBC-837C-55BD3E726E6A
I have tried to login against all hosts in the /etc/hosts i.e. the localhost/127.0.0.1 and others as well. But no joy.
[db-shop2]$ mysql -h 127.0.0.1 -uroot -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Thank you.

Comments

User_KN1IX

I re-installed mysql.
I think the Stack template assigns a password but does not display it afterwards.

dvohra21

No need to provide a host name. Just use

mysql  -u root
User_KN1IX

Mysql was installed with a root password. So that does not work.

dvohra21

If password was used:

mysql  -u root -p 

Provide password when prompted. Is password not known?

1 - 4

Post Details

Added on Jul 27 2021
4 comments
728 views