I routinely manipulate the mysql.user table to change host ip addresses of different users. The easiest way for me is to use a simple UPDATE statement that changes all Host=’xxx.xxx.xxx.xxx’ to Host=’yyy.yyy.yyy.yyy’ using this statement:
UPDATE user SET Host='yyy.yyy.yyy.yyy' WHERE Host='xxx.xxx.xxx.xxx';
If this is done then the changes will not immediately be reflected in the operation of the server and a lot of times it is inconvenient to restart the MySQL server just to make these updates. This is where the statement below comes in handy:
FLUSH Privileges;
Since MySQL will cache these privileges in memory to speed up operations this statement will flush the cached values and force the server to rebuild and the server operations will reflect your changes.
Source: http://dev.mysql.com/doc/refman/5.0/en/flush.html