Help - Search - Members - Calendar
Full Version: Mysql (can't Connect, Too Many Connections)
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
The_Boss
So that's the error log :
QUOTE
Can't connect to database! Too many connections Line 114 : mysql.class.php


Normally, in morning to evening, my database works fine, and i can access to my website, but, in the night, i can't access to it (the page loads eternally) and 1 or 2 hours after, i got the error.

Yesterday, it works fine at 07:50:06 (France time), so the error continued from the night, to 7h.
Please help me, i have some visitors in the night !

Thank you. (ans sorry for my bad english)
ssfdre38
can you please show line 114 so we can see what the error is talking about
The_Boss
Hi .

112 : if($errors_management)
113 : {
114 : $this->_error('','Can\'t connect to database!',__LINE__,__FILE__);
115 : }
116 : else
117 : {
118 : return CONNECTION_FAILED;
119 : }

I think it's because simultaneous connections, but how i fix it ?

Thank you ssfdre38 !
adam007
use this code

<?php
// Connects to Our Database
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error());
mysql_select_db("Database_Name") or die(mysql_error());
?>
Now, whenever we need to connect to our database, we just include this line in our PHP file:
//MySQL Database Connect
include 'datalogin.php';
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.