Please Follow the Below Steps to resolve this issue:

Step 1

mysql -u root -p


Enter password:

mysql>use mysql

mysql>GRANT ALL ON *.* to root@'192.168.56.101' IDENTIFIED BY 'your-root-password';

mysql>FLUSH PRIVILEGES;

Step 2

in MySQL and remove the line

bind-address = 127.0.0.1


from /etc/mysql/my.cnf

Step 3 : Add the ip address in /etc/hosts file

127.0.0.1 localhost
192.168.56.101 localhost