Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ERROR 1045 (28000): Access denied for user 'root'@'localhost' - When trying the command "mysql -u root -p" in sandbox 2.5,

avatar
New Contributor

Hello Sir/ Mam,

I have installed Sandbox 2.5 and tried to execute the set up steps as in the document.

Tried to execute the command:

mysql -u root -p

and receiving the error as below,

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I have logged in as root and change the default password.

Can you please help me to resolve this?

Thank you,

Sankar.

,

1 ACCEPTED SOLUTION

avatar
Master Mentor

@sankar sankar

After you run the "mysql -u root -p" command when it asks for password please enter "hadoop" as password.

Example:

# mysql -u root -p
Enter password: hadoop

- Operating System password and MySQL passwords can be different.

.

- But if you have changed mysql root password then you might want to look at the following link which talks about If you assigned arootpassword previously but have forgotten it, you can assign a new password.

https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@sankar sankar

After you run the "mysql -u root -p" command when it asks for password please enter "hadoop" as password.

Example:

# mysql -u root -p
Enter password: hadoop

- Operating System password and MySQL passwords can be different.

.

- But if you have changed mysql root password then you might want to look at the following link which talks about If you assigned arootpassword previously but have forgotten it, you can assign a new password.

https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html

avatar
New Contributor

Thanks a lot @Jay SenSharma

It worked ie, Earlier I changed the operating system password and tried to use the same for the database and had the issue.

Once I start using the default password for the database (hadoop) it worked.