How to grant all privileges to all users in mySQL ?
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
What do I replace username with in order to allow it for every user on the given IP?Even if it is ''
i.e no username at all in input ?
I tried *
and %
in username but that did not help.
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 is working for all my MySQL users irrespective of their hostname and Ips.
GRANT ALL ON <yourdbname>.* TO ''@'%' IDENTIFIED BY 'yourdbpassword';
FLUSH PRIVILEGES;
This should work:
GRANT ALL PRIVILEGES ON 'database'.'table' TO '%'@'1.2.3.4' WITH GRANT OPTION;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With