Learning MySql 45 Minutes at a Time

This and all future MySql posts are really for my own record keeping so that when dumb things happen that take me 45 minutes to fix, I have a record of them for future such incidents.

Today, for some reason, I couldn’t log in remotely to the MySql instance running on my Mac. This has been working just fine for the past month so needless to say, I had no idea what happened. As it turned out, the IP address of my Parallels instance had changed, rendering all the entries in my user table pointless. I had to update the user table with the new IP, restart the MySql instance and boom, up and running again.

Login from the terminal first:

mysql -u root -p

Then:

USE mysql;

select Host, User from user;

update user Set Host = 'NEW IP' where Host = 'OLD IP';

select Host, User from user;