First of all find all the users in your database having permissions.
mysql> select user,host from mysql.user;
If you want to see their permissions,
mysql> show grants for 'root'@'localhost';
Now you want to change the host part of a user. You can issue the below command :
mysql> UPDATE mysql.user SET host = 'New_IP' WHERE host = 'Old_IP' AND user = 'user_you_want_to_change';
mysql> flush privileges;
Very easy 🙂