アクセスする側のドメインでアクセスを制御したりできる。
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%.example.com' IDENTIFIED BY 'some_characters' WITH GRANT OPTION; FLUSH PRIVILEGES;
The percent sign means all ip's so localhost is superfluous ... There is no need of the second record with the localhost .