I realized today I actually have two MySQL databases on my Mac OS X Sierra because when I log in to MySQL via iTerm, its not the same database as what I see via phpMyAdmin, but no matter what username or password I attempt from the user accounts in phpMyAdmin, I am unable to log in to that particular database even if I change the password to any of the users.

In this case I checked the wp-config.php in my WordPress core files for the database username and password, but I was not able to log in with those, which means those are not the correct credentials.

I realized after retracing my steps that those were the creds for the production database.

What I did not realize here is that I could have a MySQL database server via Homebrew and still have another MySQL database server via MAMP. I thought they would be one and the same server.

  • Without some more details we can't help you here: sitting in front of our Macs (or buying xmas gifts) we don't have the opportunity to look over your shoulder and personally check what's wrong here. E.g.: two MySQL databases may mean to different mysql installs (MySQL Community edition & xammp), a database in each of the two mysql installs, two databases in one of the two different installs...etc. – klanomath Dec 16 '17 at 19:52

I figured it out reading the MAMP documentation. For anyone who may run into this in the future.

Just go to your iTerm and type:

/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot

You should be able to successfully log in. The MAMP docs helped after I realized MAMP database server is independent of what gets installed with Homebrew.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .