Grant all privileges to all users on a host in mysql
This is working for all my MySQL users irrespective of their hostname and Ips.
GRANT ALL ON <yourdbname>.* TO ''@'%' IDENTIFIED BY 'yourdbpassword';
FLUSH PRIVILEGES;
You can try like this:
GRANT ALL PRIVILEGES ON *.* TO ''@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
The manual says:
In this case, any user who connects from the local host with the correct password for the anonymous user will be permitted access, with the privileges associated with the anonymous-user account.
This should work:
GRANT ALL PRIVILEGES ON 'database'.'table' TO '%'@'1.2.3.4' WITH GRANT OPTION;