1 - Is it possible to create new MySQL user and database via PHP script?
2 - If so, would it involve any such security risk?
Objective: I have a system running (CMS itself) where the user does almost everything to activate on the server, being that, this will be allocated in a subdomain on our server, therefore, creating a database for this new user for this new subdomain would need to be automated at the time of registration, which today does not occur and every time we have to create new user and database for a new registration. I accept suggestions if they have other ways.
Details: VPS running Linux / WHM (11.52.0) / cPanel (11.52.0.15) / MySQL (5.6.23) / PHP (5.5)