Hi Guys, I'm currently designing a SaaS solution with PHP & MySQL. It will be multi tenancy with separate databases and login for each database. I am trying to do the following: Create a MySQL User `master` (instead of using `root`) which can create tenant databases and assign permissions but not have access to the databases itself. This intends to be more secure so that if the master accont was accessed tenant account are safe. I just can't get the code below to work as it fails with the error: "Access denied for user 'master'@'localhost' to database 'mysql'" on the line "GRANT USAGE ON * . * TO 'site_user1' ..." Can anyone see what I am doing wrong? +------------------------- | Master User: Created as root +------------------------- CREATE USER 'master'@'localhost' IDENTIFIED BY 'password'; GRANT CREATE , CREATE USER ON * . * TO 'master'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; CREATE DATABASE IF NOT EXISTS `master` ; GRANT ALL PRIVILEGES ON `master` . * TO 'master'@'localhost'; +------------------------- | Site Account Creation: (Logged in as master User) +------------------------- CREATE USER 'site_user1'@'localhost' IDENTIFIED BY 'password'; GRANT USAGE ON * . * TO 'site_user1'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; CREATE DATABASE IF NOT EXISTS `site_user1` ; GRANT ALL PRIVILEGES ON `site\_user1` . * TO 'site_user1'@'localhost'; +------------------------- | Site Schema Populate: (Logged in as site_user1 User) +------------------------- Code (markup):