Php database connect problem

Status
Not open for further replies.

banspad

New Member
Messages
2
Reaction score
0
Points
0
I get this error when I try to use my dbconnect.php

Warning: mysql_connect() [function.mysql-connect]: #07000(proxy) all backends are down

I have only made database connections on my localhost before so I am sure I am doing something wrong, my connect file is
Code:
<?php
		$con = mysql_connect("localhost","MyUsername","MyPassword");
		if (!$con) {
			die('Coulnd not connect: ');
		}
?>
Any help appreciated :)
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
It's probably a transient problem with the MySQL servers. If it persists, work through the many threads on this topic (you should always search before starting a new thread).

The old mysql driver is quite outdated, having been supplanted twice over. PDO is the modern extension to use. If you want a tutorial on its use, read "Writing MySQL Scripts with PHP and PDO."
 
Last edited:

banspad

New Member
Messages
2
Reaction score
0
Points
0
Ok thanks, it must not have been my issue it worked once I came back on here
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
Since your problem is solved, I am marking this thread as closed.
*****Thread Closed*****
 
Status
Not open for further replies.
Top