-1

I am new to mysql. So after download the server and workbench from mysql.com, I did run "./mysql -u root -p" and whenever I entered the password I saw the error below:

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

Also, whenever I typed "mysql -u root" as other people recommended I got another error below:

-bash: mysql: command not found

How should I fix these errors?

Please help.

Thank you

Nomad
  • 167
  • 7
Jin Kweon
  • 7
  • 2

1 Answers1

0

I did run "./mysql -u root -p"

At least command executed successfully.

whenever I typed "mysql -u root"

-bash: mysql: command not found

Command didn't execute, because mysql is not in your $PATH variable in bash.

Try

./mysql -u root

P.S. If it fails with Access denied error, try reinitializing your mysql server.

Nomad
  • 167
  • 7
  • I tried what you said, but I got another error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) – Jin Kweon Mar 31 '17 at 03:07
  • I see. Can you explain how did you configure it initially? How did you set up password? What OS are you running it on? It is probable that user _root_ doesn't exist yet. – Nomad Mar 31 '17 at 03:25
  • above link is invalid. nothing found. – Md Sifatul Islam May 18 '21 at 08:41