0

I have installed MySQL Workbench on my Mac. I am trying to connect the MySQL. I am not able to connect.

I have attached the screenshot.

I am getting Access denied for user 'root'

enter image description here

5
  • what version of MySQL? (how You install it) - is it create temp password during installation? could You connect from terminal with command line client and user root?
    – a_vlad
    Commented Mar 15, 2017 at 1:47
  • I installed workbench and server version. Both are community edition
    – goofyui
    Commented Mar 15, 2017 at 2:07
  • I mean - when You install MySQL, it create for You temporary password - did You wrote it? are You use the same or You already change it? Did You try connect to MySQL from terminal window?
    – a_vlad
    Commented Mar 15, 2017 at 2:10
  • something like - /usr/local/mysql-5.7.15-osx10.11-x86_64/bin/mysql --host=127.0.0.1 -u root -p , You can change 5.7.15 - change for You actual version
    – a_vlad
    Commented Mar 15, 2017 at 2:12
  • Is Workbench on the same computer as mysqld?
    – Rick James
    Commented Mar 16, 2017 at 0:29

1 Answer 1

1

Common issues:

  • Is MySQL server running? check that by making sure you have 1 or more processes called mysqld
  • Is MySQL listening on the 127.0.0.1 address? Make sure it is not running with skip-netwoking or with bind-address different from 0.0.0.0, *, or 127.0.0.1 (it could be only listening on a public ip)
  • Is there an user called root? It should be there if you just installed it
  • Did you write the right password- in the latest MySQL versions, mysql gets installed with a random default password. You need to know that or connect to the socket (localhost + socket, not 127.0.0.1 + 3306) using the unix_autentication plugin
  • What error do you get? It is not the same to get a "could not connect" than a "connection denied"- the first one could be points 1 and 2, the second 3 and 4. Can you connect using the command line "mysql"?
  • Do you have the latest mysql workbench version? Latest authentication methids may not be supported on old workbench versions

This is a very common question, please read the manual first for troubleshooting: https://dev.mysql.com/doc/refman/5.7/en/can-not-connect-to-server.html

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.