How To Create MySQL Connection Strings ?

Started by Dipak Bhoi, September 05, 2014, 11:46:49 PM

Previous topic - Next topic

Dipak Bhoi

Hello guys,

MySQL Connection Strings : A connection string is a sequence of variables which will address the specific database and allow you to connect your code to your MySQL database. But first you need to create a Database from cPanel.

Connection String Syntax :

For PHP :

Quote$dbh=mysql_connect ("localhost", "db_Username", "password")
or die ('I cannot connect to the database.');
mysql_select_db ("db_Name");

That's all.

Enjoy !!!
MilesWeb - 30-Day Money Back
cPanel Web Hosting - cPanel Hosting in India
Grab a Free SSL for your website.  WordPress Optimized Solution.