Can't connect to MySQL

japem picture japem · Mar 19, 2014 · Viewed 9.5k times · Source

I'm trying to connect to MySQL, using Sequel Pro, something I have done many times before. Host 127.0.0.1, username root, no password. I get the following message:

Unable to connect to host 127.0.0.1 because access was denied.

Double-check your username and password and ensure that access from your current location is permitted.

MySQL said: Access denied for user 'root'@'localhost' (using password: NO)


For what it's worth, I got this message after upgrading to a new Mac OS (Mavericks), realized that the server wasn't running, downloaded a new server (which is currently running), and tried again - but I had the same problem.

Answer

Pankaj Gadge picture Pankaj Gadge · Mar 19, 2014
  1. Make sure you are running MySql in background System Preferences -> Mysql -> Start MySql
  2. Make sure you are able to connect to MySql through command line, if command line works, there is no reason why it should not work in SequelPro.
  3. If problem still persists, try changing the 'root' password.