Help - Search - Members - Calendar
Full Version: Mysql Connecting
Zymic Webmaster Forums > Zymic.com Support > Bugs, Suggestions & Other Non-Hosting Support
borkoyz
im sort of new here and with mysql but anyway, im having trouble connecting to mysql, im using php.

im not sure is this right??

//users details
$db_server="localhost";
$db_user="**my username**"; <--- does the username have to have @localhost?????
$db_pass="***my password***";


//mysql details
$db_main="***my db name***";
$db_table="*** my db table***";

//conection
$con= mysql_connect($db_sever,$db_user,$db_pass) or die("<b>Error:</b> ". mysql_error());

//connects to the main db
$rs=mysql_select_db($db_main,$con) or die("<b>Error:</b> ". mysql_error());
swordz
User name is without @localhost, and is of the form sitename_yourpart.

Beyond that, if this is copied code, your problem is a misspelt server in the myqsl_connect line.

swordz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.