unable to connecto to mysql database

mind.werx.co76

New Member
Messages
2
Reaction score
0
Points
0
i was trying to connect to my MySQL server..

PHP:
<?php

	$link = mysql_connect('localhost', 'mindwerx_root', 'mypassword');
	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	}
	else
	{
		echo "Connected!<br/>";
	}

	$db = mysql_select_db('mindwerx_testdatabase');
	if(!$db) {
		die("Unable to select database");
	}

?>
You can see the page here..
was there something wrong with the code?
please help me..
 

vv.bbcc19

Community Advocate
Community Support
Messages
1,524
Reaction score
92
Points
48
"mindwerx_testdatabase" is too big a database name.
Try some small named database like mindwerx_tdb
Post back please

---------- Post added at 03:04 PM ---------- Previous post was at 03:02 PM ----------

Also there is nothing wrong with the code.
Its working for me in mozilla firefox.No need to change your name.
But it is taking a hell lot of time to get connected.Something is wrong with STARKA server but not with your code.
Anyway keep your database names simple and small.
Regards,
VVBB
If you find my post useful,consider clicking the star in the lower left corner to give me some Reputation.
 
Last edited:

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
I added your user to your database, should work fine now.
 
Top