Hi
when installing a cms, I want to create a database (by the php code)
but in cpanel, when we create the database, we have to add the user to the database
so is it possible to create the database by php code and add the user to it?
thanks for your help
database permission by php
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: database permission by php
1.) Go to cPanel.
2.) Click "MySQL® Databases".
3.) Create a database.
4.) Create a user.
5.) Associate the database with the user.
The fifth step is a bit tricky but all you have to do is look on the page for Add Users To Your Databases: and select the database and the user on the two select menus below and then click on the button that says, 'Add User to Database'.
Once you do this all you have to do is make sure you're using the correct credentials to connect to the database.
2.) Click "MySQL® Databases".
3.) Create a database.
4.) Create a user.
5.) Associate the database with the user.
The fifth step is a bit tricky but all you have to do is look on the page for Add Users To Your Databases: and select the database and the user on the two select menus below and then click on the button that says, 'Add User to Database'.
Once you do this all you have to do is make sure you're using the correct credentials to connect to the database.