CREATE USER when user already exists
Your way would seem fine. Older versions of MySQL do not have DROP USER IF EXISTS.

Here is another way that would get around that issue with older versions

DELETE FROM mysql.user WHERE user='${domain}' AND hostname='localhost';
DELETE FROM mysql.db   WHERE user='${domain}' AND hostname='localhost';
FLUSH PRIVILEGES;
DROP DATABASE IF EXISTS '${domain}';
CREATE DATABASE '${domain}';
GRANT ALL PRIVILEGES ON ${domain}.* TO '${domain}'@'localhost';