Sunday, 17 April 2016

How to give permission to any host for root user of MySQL ?


Setting permission to any host on Linux

You’ll need to update the mysql user table to allow access from any remote host, using the % wildcard.

Step 1. Open the command line MySQL client on the server using the root account.
Set the MySQL environment and connect MySQL by root
$ mysql -u root -proot

Step 2. Run the commands to see what the root user host is set to already
> use mysql;
> select host, user from user;

Step 3. Update the localhost host to use the wildcard
> update user set host=’%’ where user=’root’ and host=’localhost’;

Step 4. Reload the privilege tables
> flush privileges;

No comments:

Post a Comment

Note: only a member of this blog may post a comment.