Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
milleusi
Forum Commoner
Posts: 30 Joined: Mon Jun 13, 2005 3:18 am
Post
by milleusi » Fri Jan 06, 2006 5:36 am
Warning: mysql_connect() [function.mysql-connect]: #08004Too many connections in line...
what is the cause of this error....
site is not yet populated, and i'm using mysql_close($link)....
for connection i'm using
Code: Select all
$link = mysql_connect('localhost', 'mysite', '')
or die('connect error ' . mysql_error());
mysql_select_db('mydb') or die('db error');
pls,pls,pls....[/i][/b]
sheila
Forum Commoner
Posts: 98 Joined: Mon Sep 05, 2005 9:52 pm
Location: Texas
Post
by sheila » Fri Jan 06, 2006 9:23 am
Are you on a shared server, sharing MySQL with other sites? Some other site could be causing the problem. Ask your host to look into it.
milleusi
Forum Commoner
Posts: 30 Joined: Mon Jun 13, 2005 3:18 am
Post
by milleusi » Fri Jan 27, 2006 4:34 am
how to know how manny connection i have for mysql. i have a page on a shared server.
if not all mysql_connect are clossed how to know this??
unclossed connection can generate this error??
tasteslikepurple
Forum Commoner
Posts: 46 Joined: Thu Jan 26, 2006 3:38 am
Location: Bath, UK
Post
by tasteslikepurple » Fri Jan 27, 2006 5:00 am
php automatically closes the connection when it's finished so you don't need to worry about connections staying open forever. as sheila said, the problem probably is that there are lots of sites on the server all trying to use mysql at the same time.