digital
06-26-2006, 04:25 PM
Here are some steps for setting up a mysql database
1. Find the file for your program usually named config.php or similar ( it might be in a subfolder of your program named "includes" or "admin", edit that file to put in your database name, database user and password.
Its usually in a format similar to this
$db_host = "localhost";
$db_username = "cpanelusername_databaseusername";
$db_password = "yourpassword";
$db_name = "cpanelusername_databasename";
At this stage you can just make up the database name, database user and password to ones which suit you. Save that file and upload to your webspace overwriting the unedited config file.
2. Login to your Cpanel and go to the MSQL Icon and click it.
Look at the next page and you will see boxes and links to create a database and database users.
(a) Create your database, do not include your cpanel username this time, the system does that automatically for you, so for example in this case we call the database: databasename
(b) Create your database user, same again do not include the cpanel username, just give your database a user with a name, in this example we will call it: databaseusername
(c) put the password you want to secure your database with in the second box and click create or enter.
(d) Not finished, click back so your back at the same page you created the database and user, now you need to ADD the user to the database, easy done just by finding the correct databasename and database username from the drop down lists and click Add or Enter.
All done, now you can follow your Scripts instructions to finish the installation of your program.
1. Find the file for your program usually named config.php or similar ( it might be in a subfolder of your program named "includes" or "admin", edit that file to put in your database name, database user and password.
Its usually in a format similar to this
$db_host = "localhost";
$db_username = "cpanelusername_databaseusername";
$db_password = "yourpassword";
$db_name = "cpanelusername_databasename";
At this stage you can just make up the database name, database user and password to ones which suit you. Save that file and upload to your webspace overwriting the unedited config file.
2. Login to your Cpanel and go to the MSQL Icon and click it.
Look at the next page and you will see boxes and links to create a database and database users.
(a) Create your database, do not include your cpanel username this time, the system does that automatically for you, so for example in this case we call the database: databasename
(b) Create your database user, same again do not include the cpanel username, just give your database a user with a name, in this example we will call it: databaseusername
(c) put the password you want to secure your database with in the second box and click create or enter.
(d) Not finished, click back so your back at the same page you created the database and user, now you need to ADD the user to the database, easy done just by finding the correct databasename and database username from the drop down lists and click Add or Enter.
All done, now you can follow your Scripts instructions to finish the installation of your program.