How do you update which hosts can connect to your mysql database from remote? Can this be done in PHP?
You can limit hosts when adding users. Should be able to do this from php without trouble....
http://dev.mysql.com/doc/mysql/en/Adding_users.html