Try the following :
Code:$link = mysql_connect('localhost', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); }
If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!i can use administrator mysql to connect to mysql server , it works fine, i use other sofware to connect and edit the database in mysql server , it works fine
BUT whene i use my script to connect to database it dont want to work , it giveme error
Could not connect to the database
---------------------------------------
$link = mysql_connect('localhost', 'root', 'password');
if (! $link)
die('Unable to connect to the databasename database');
mysql_select_db('databasename') or die('Could not open databasename database');
-------------------------------------------------------
mysql=4.1
php=4
i am close to lose it and format this thing
any one help me out here ? befor i crash it please ?
Try the following :
Code:$link = mysql_connect('localhost', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); }
LocaFY.in - The smartest way to find local information in India
Can't create TCP/IP socket (5)
that is what it give
Originally Posted by TvDomain
any one can help ?
Last edited by TvDomain; 07-19-2005 at 12:22 PM. Reason: Automerged Doublepost
Ask your host why u are getting that error.
538k Lyrics Database Available - Only $49 - Check Here
it is done guys , i fixed it , and it was mysql server problem with autentification , thank anyway
Bookmarks