My PHP program tells me it can't access the database and gives errors ?
Posted by Michael, Last modified by Kim S. on 19 January 2016 08:19 PM

When you create your MySQL database, first you create a database by giving it a name. Then you create a user by entering a username and password. For best results keep your database name, database username, and database password at no fewer than 6 and no more than 7 letters or numbers. Then you must be sure to add the user to the database.

In your script, your database name and your database username must be prefaced by your hosting account username_.  Your password, however, stands alone.

For example: If your hosting account username is "fastweb1", your database name is "testdb", your database username is "dbuser", and your database password is "passwd", here is how you need to put them in your script:

database server should be :   localhost
database name should be written as fastweb1_testdb
database username should be written as fastweb1_dbuser
database password should be written simply as passwd

 


Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).