Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th February 2013, 16:19
pawan pawan is offline
Senior Member
 
Join Date: Jul 2010
Posts: 222
Thanks: 44
Thanked 6 Times in 6 Posts
Default Database connection error (2): Could not connect to MySQL after PHP upgrade

I have upgraded my php from 5.3 to 5.4 and now I am getting frequent mysql error:
Database connection error (2): Could not connect to MySQL

is it related to php upgrade or some other reason.

I am also getting this error when I trying to log on ISPCONFIG admin

Code:
DB::__construct Too many connectionsDB::__construct Too many connectionsDB::query(SELECT * FROM sys_session WHERE session_id = '') -> mysqli_query Too many connections#0 db
ISPCONFIG SERVER LOG
Code:
PHP Warning: mysqli::close(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 70
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: mysqli::mysqli(): (08004/1040): Too many connections in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 61
DB::__construct Too many connections
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 65
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 66
PHP Warning: mysqli::ping(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 106
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 107
PHP Warning: mysqli::escape_string(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 166
PHP Warning: mysqli::ping(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 106
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 107
PHP Warning: mysqli::close(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 70
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 61
DB::__construct Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I am also getting this error repeatadely in ispconfig log
Code:
ERROR - Plugins directory missing: /usr/local/ispconfig/server/plugins-core/

Last edited by pawan; 18th February 2013 at 17:49.
Reply With Quote
Sponsored Links
  #2  
Old 18th February 2013, 18:16
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,385
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

1) Set:

max_connections = 500
max_user_connections = 500

in [mysqld] section of the /etc/mysql/my.cnf file and restart mysql.

2) Your xcache extension does not seem to be correct for your new php version.

3) Seems as if parts of your ispcnfig install have been removed if the directory /usr/local/ispconfig/server/plugins-core/ is missing.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th February 2013, 19:06
pawan pawan is offline
Senior Member
 
Join Date: Jul 2010
Posts: 222
Thanks: 44
Thanked 6 Times in 6 Posts
 
Default

Thanks Till

I have made the changes in mysql my.cnf file as per your suggestion and update you.

what should I do for removing the xcahe error. I think I am not using xcache in any of the setup.

Quote:
Seems as if parts of your ispcnfig install have been removed if the directory /usr/local/ispconfig/server/plugins-core/ is missing.
Today I have upgrade my ispconfig installation, in there I also didn't find the plugins-core directory.
I have checked the older backups, where there is a plugins-core directory, but that is empty.
How can I restore this folder.

Again I am getting another error repeatedly like this
Code:
PHP Warning: mysqli::escape_string(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 204

PHP Warning: mysqli::mysqli(): (08004/1040): Too many connections in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 71
DB::__construct Too many connections
my ispconfig version is 3.05 RC2.

Last edited by pawan; 18th February 2013 at 19:19.
Reply With Quote
Reply

Bookmarks

Tags
mysql, php5.4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only Problems since Updating from 3.0.3.3 to 3.0.4.1 mbay General 4 17th May 2012 12:56
ISPConfig3 Debian Squeeze Crontab - Log petrichbg Installation/Configuration 5 22nd March 2011 12:25
Apache not restart after change php mode wiss Installation/Configuration 15 3rd November 2010 15:43
Mail Question: installed smf forum on centos perfect server setup with ispconfig happz Installation/Configuration 7 22nd August 2008 13:15
debian etch courier pop3 issue docean Installation/Configuration 6 20th March 2008 15:38


All times are GMT +2. The time now is 09:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.