In 99.9% of the cases it is a very bad idea to let a user create a database. Maybe you should tell us more about your global target and we can offer you a complete other solution?
I see no problem with a user being able to freely create and manage databases (if they start with test_). It prevents him from accessing the other databases in the system.
The goal is to create a user who is able to manage databases that was created by himself, without affecting the security of the other databases in the system