I need a php script that I can give to my users so they can create a MySQL database on their website without having to go through their control panel/phpMyAdmin.
If possible, the script can be used for other control panels as well as cPanel, such as Plesk, etc. It can also be used on sites with no control panel. I require a general purpose script that can install MySQL databases on any website regardless. I hope this is possible somehow. If it is not possible to use with all control panels, I will accept any control panel. Please confirm which one or all.
The script is on the same server as the MySQL database so there shouldn't be any problems with permissions, etc.
The user goes to an on-line form with edit boxes:
Username/login
Password
Database Name
User clicks "submit" button. Another page will open:
Installing... Please wait.
Database name: chronosy_xxx3
Database username: chronosy_xxx3
Database password: 4452b36f72b0
Database installed successfully.
Script will add user to database (using same name as database). User will have ALL permissions.
A button is next to the editbox for the password. If clicked, the password is randomly generated. Otherwise the user can enter this himself.
cURL may or may not be used.
A file called "dump.sql" may be in the same directory as this script. This must be automatically imported into the database. Please note that sometimes this sql file will not exist so, if it doesn't, an error should NOT be produced. It should just miss the import.
Each section (as above) should be separated with, for example," // ########## DATABASE START" and " // ########## DATABASE END" etc and operations well commented throughout for any changes I may wish to make later.
The script must have a consistent look throughout so header.htm and footer.htm files must be included.
Also I will own the copyright.