Database Error: Failed connecting to the database

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
Hello,

When I try download more 5 files (premium), I will get this error:

Code:
Database Error: Failed connecting to the database with the supplied connection details. Please check the details are correct and your MySQL user has permissions to access this database. (host: localhost, user: xxxx_admin, pass: ********)
and I were set value = 3 for none user, but they still can download unlimited (I were set value = 0 before)
The maximum files a non-logged in user can download in a 24 hour period. Set to 0 (zero) to disable.
How can I fix it?

Note:
I were edit In includes/class.dbsession.php to avoid auto logout:


Code:
    $db->query('DELETE FROM `sessions` WHERE `updated_on` < :updated_on

    Replace entire line with:

    $db->query('DELETE FROM `sessions` WHERE `updated_on` < :updated_on', array('updated_on' => time() - (60*60*24*7)));
Thanks
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
This is info of my server:

Code:
Server: HP DL180G6
CPU:2x Intel Quad-Core Xeon E5620
RAM:8GB
Harddisks:4x1TB SATA
RAID (HW/SW):RAID 10
Connectivity: Volume
Bandwidth:70TB
Uplink: GEV
IPv4/IPv6:1
SLA:Basic
OS: Centos 6 64bit:
Partitioning: Default
Control Panel:cPanel/WHM
Everytime my site have 20 users, my site will get this error:

Code:
Database Error: Failed connecting to the database with the supplied connection details. Please check the details are correct and your MySQL user has permissions to access this database. (host: localhost, user: xxxx_admin, pass: ********)
I very tired about it. please help me. Thanks all
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
Try editing /etc/my.cnf

Look for
Code:
max_connections = xx
Change it to something like:
Code:
max_connections = 2000
If max_connections is not in the file, you can add it.

You will need to restart MySQL once you have made the changes.
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
@ysmods: thank you very much.
But I am using WHM, how can I edit it? I don't know where?

Sorry about my stupid,
Thanks for helping.
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
Log into root ssh using putty or similar.

Type in
pico etc/my.cnf

Edit the file.
Ctrl +x
Type yes and hit enter to save.

Log into whm, restart MySQL in whm, as its easier than typing out instructions how to do it in ssh lol
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
ysmods said:
Log into root ssh using putty or similar.

Type in
pico etc/my.cnf

Edit the file.
Ctrl +x
Type yes and hit enter to save.

Log into whm, restart MySQL in whm, as its easier than typing out instructions how to do it in ssh lol
I were try it, right?


Thank you so much :p