Changing host permissions for MySQL users

If you’ve got access to the mysql database, you can change the grant tables directly:

UPDATE mysql.user SET Host="%" WHERE Host="localhost" AND User="username";

…and an analogous UPDATE-statement to change it back.

Also you might need to make changes to the mysql.db table as well:

UPDATE mysql.db SET Host="%" WHERE Host="localhost" AND User="username";

and then flush to apply the privileges:

FLUSH PRIVILEGES;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)