Create a user with privileges to create users
To be able to create mysql users, you need to be able to insert into the users table in the mysql database. So create your master user and give him write access to the mysql database.

The documentation states ( http://dev.mysql.com/doc/refman/5.7/en/create-user.html )


  To use CREATE USER, you must have the global CREATE USER privilege or
  the INSERT privilege for the mysql database. When the read_only system
  variable is enabled, CREATE USER additionally requires the SUPER
  privilege.


So the process would be something like this:

(root)&gt; create user masteruser ...
(root)&gt; grant CREATE_USER to masteruser ...
(masteruser)&gt; create user foo1 ...
(masteruser)&gt; create user foo2 ...


Also, it is deemed good practice to use a test system to test such behaviour; so that when you mess up, there is no harm done to a actual real database.