How do I configure my connection

Status
Not open for further replies.

genera33

New Member
Messages
1
Reaction score
0
Points
1
what will I put in this php code:

if(!mysql_connect("http://cocgsd.x10host.com","cocgsdx1@localhost",""))
{
die('oops connection problem ! --> '.mysql_error());
}
if(!mysql_select_db("cocgsdx1_gsd"))
{
die('oops database selection problem ! --> '.mysql_error());
}


what should I put for username and localhost for my website and database in x10hosting to connect with each other?
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
to configure your script to connect to MySQL - the following settings should be used:

Host/Server Name -> [ localhost ]

Port -> [ 3306 ] (not necessary)

Username -> Your cPanel username followed by an underscore (i.e. "_") and the MySQL username you configured in cPanel

Password -> The password that you used when creating the MySQL user in cPanel

Database -> Your cPanel username followed by an underscore (i.e. "_") and the name of the database that you created in cPanel

Remember: Free hosting accounts do not have remote MySQL access.
###
 
Last edited:
Status
Not open for further replies.
Top