cannot connect mysql

Status
Not open for further replies.

bohlinghaus

New Member
Messages
1
Reaction score
0
Points
0
i know this has been asked before but unfortunately i do not see a solution...

mysql_connect('localhost','xxx_xxx','xxxx')or die("Cannot connect to server. Sorry.");
mysql_select_db('xxxx_xxxx_xxxx')or die("Sorry, database is not reachable");

it dies on the second line.

a dbase is created, so no problem there.

i know you have to create dbase on cpanel, but can tables be created with php? maybe that is where the problem lies.

---------- Post added at 05:14 PM ---------- Previous post was at 03:52 PM ----------

disregard, i think i fell into a solution blindly. i would mark closed, but do not know how. thanks.
 

narender

New Member
Messages
2
Reaction score
0
Points
1
$link = mysql_connect('localhost','xxx_xxx','xxxx')or die("Cannot connect to server. Sorry.");
mysql_select_db('xxxx_xxxx_xxxx', $link)or die("Sorry, database is not reachable");

use the above code for connect hopefully it will be connected with the $link.
i think you have missed the link.

Regards,
Narender
http://narenderdesigns.x10.mx
 
Status
Not open for further replies.
Top