0

I am new to MySQL. I have installed MySQL 5.6 in Windows 7 with user root and given password to it. But when I start MySQL Workbench and try to connect database, I am getting an error.

My try:

Connect to Database:

enter image description here

Connect to MySQL Server:

enter image description here

Error:

enter image description here

Then I tried to reset password with command prompt:

enter image description here

Please help me, I am new to MySQL, not getting what to do.
Thanks

Sarfaraz Makandar
  • 4,927
  • 14
  • 53
  • 81
  • I think this is the similar problem.http://stackoverflow.com/questions/7864276/cannot-connect-to-database-server-mysql-workbench – Deb Aug 28 '14 at 11:23

3 Answers3

1

It's possible that your setup is not listening for IP connections and is only listening on a local socket. Try:

mysql -u root

If you have already set a root password, try:

mysql -u root -p

on the command prompt. Or try removing the hostname from workbench.

Daniel Scott
  • 6,757
  • 4
  • 33
  • 53
0

It seems you do not have access for such task, exit the application and re-start it as administrator . Run As Administrator

Aay Que
  • 926
  • 6
  • 15
0

You can resolve this issue using these steps.

1.open the terminal

2.exectute the command - sudo mysql -u root

3.then,execute - ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';(*replace the "new_password" with your new password"

4.exit;

5.now check the connection...It will work :)

janadari ekanayaka
  • 2,120
  • 2
  • 9
  • 12