MySQL: Grant Root Access from Any IP

Warning: Not a good idea on a production database. I use this only for local dev environments when I have virtual machines running via a bridged connection and DNS changes often.

Log into MySQL on the server machine via the command line
mysql -u root -p

Using the MySQL wildcard ‘%’ in place of an IP
GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s