Forum Moderators: coopster
Warning: mysql_connect(): Too many connections in /home/thesite/data/dbconfig.php on line 8
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/thesite/data/dbconfig.php on line 9
Warning: mysql_query(): Access denied for user: 'root@localhost' (Using password: NO) in /home/thesite/public_html/page.php on line 1117
Warning: mysql_query(): A link to the server could not be established in /home/thesite/public_html/page.php on line 1117
So, my question is, how can I set up my dbconfig file to use more than one dbuser with the same database? Such as, if one dbuser doesn't work, try the other?
This is what I have now:
<?php
$dbhost = 'localhost';
$dbuser = 'thesite_user';
$dbpass = 'password';
$dbname = 'thesite_db1';
$mysql_access = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname, $mysql_access);
?>
Any ideas or solutions would be greatly appreciated. ;)
PP
"Too many connections"
you have a limited number of connections from any given host, you could ask them what your limit is and how you would go about increasing it. This isn't necessarily bound by user.
If you can't then maybe having less db accesses will be necessary.
[dev.mysql.com...]
In the meantime, I have two header files, one for users and one for admins. I just created a second dbconfig file and set that up with a different dbuser. We admins put a lot of strain on the system, forcing it to do multiple processes, so I think this will help a little.