I have a web application that should manage a multi client solution. Due to the complexity of the solution, each client would require 4 database to store data.
The portal itself is another database that sits on top. I now think of making the administration a bit easier and extented the script of new client creating.
The script should automatically create a set of 4 new databases, create a new user based on form input and grant that user access. Finally it should store that credentials in the user configuration.
Problem: I'm a bit concerned to store credentials of a admin user in a php script. I guess the script must have a powerfull user to be able to create users, databases and also grant access.
Are there any best practice how to ensure that the application is protected?