[Snippet] Allow mysql root access from anywhere

A small annoyance of mine is on local development servers, I can’t login to the MySQL server as root.

Simply connect the mysql shell

mysq[codesyntax lang=”bash”]
mysql -u

Then,

[codesyntax lang=”bash”]
GRANT ALL ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘[A PASSWORD]’

Exit and you’re done.

Author: Kieran Barnes

Kieran is a PHP developer with 15 years commercial experience. Specialist in WordPress, CakePHP, CubeCart and all things PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *