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 15th September 2011, 20:20
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default ERROR - Unable to connect to the database

Hi guys,

I've managed to break my ispconfig install again... When I want to add a MySQL database to ispconfig for one of my clients, i get the following error message in /var/log/ispconfig/ispconfig.log:

ERROR - Unable to connect to the database

Adding a FTP user works as well..

I've tested the MySQL user and password from /usr/local/ispconfig/server/lib/config.inc.php and they can login to the ispconfig database. What does this error mean? And more important, how can i fix it?
Reply With Quote
Sponsored Links
  #2  
Old 15th September 2011, 21:12
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

I've got some more errors... When I try to add or remove a database, I see the following error in syslog:
Code:
Sep 15 20:06:01 server1 CRON[6509]: (root) CMD (/usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
Sep 15 20:07:01 server1 init: mysql main process (6391) terminated with status 1
Sep 15 20:07:01 server1 init: mysql main process ended, respawning
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6528]: Upgrading MySQL tables if necessary.
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6531]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6531]: Looking for 'mysql' as: /usr/bin/mysql
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6531]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6531]: This installation of MySQL is already upgraded to 5.1.41, use --force if you still need to run mysql_upgrade
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6542]: Checking for insecure root accounts.
Sep 15 20:07:01 server1 /etc/mysql/debian-start[6546]: Triggering myisam-recover for all MyISAM tables
Sep 15 20:07:01 server1 CRON[6627]: (root) CMD (/usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
It seems that MySQL is crashing and restarting.. That's not a good thing!

Last edited by jorizzzz; 15th September 2011 at 23:12. Reason: extra info
Reply With Quote
  #3  
Old 16th September 2011, 11:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

You might want to try raising the max_connections parameter in your my.cf file. Restart MySQL afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 16th September 2011, 12:15
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Falko,

That option was commented out in my.cnf. I've enabled it and set it to 200. It didn't work Same error as before...
Reply With Quote
  #5  
Old 17th September 2011, 12:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

Is this a physical server or a virtual machine? If you use OpenVZ, what's the output of
Code:
cat /proc/user_beancounters
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 28th September 2011, 10:04
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Quote:
Originally Posted by falko View Post
Is this a physical server or a virtual machine? If you use OpenVZ, what's the output of
Code:
cat /proc/user_beancounters
?
Falco, it's a virtual machine (Ubuntu 11.04). I don't have a user_beancounters in /proc
Reply With Quote
  #7  
Old 28th September 2011, 10:29
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

I even tried using the MySQL root username and password in the ISPConfig system. Still the same error I was hoping that it was a SQL rights problem, but that wasn't the case
Reply With Quote
  #8  
Old 28th September 2011, 11:02
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Ok, i've found something that might help. I've enabled query logging in MySQL and found the following:

203 Query SELECT * FROM sys_datalog WHERE datalog_id > 507 AND (server_id = 1 OR server_id = 0) ORDER BY datalog_id
204 Connect Access denied for user 'root'@'localhost' (using password: YES)


Is the cron job for creating the databases running with user root?
Reply With Quote
  #9  
Old 28th September 2011, 11:31
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
 
Default

Ok I fixed the problem! I wasn't aware that you are using the user 'root' to create new databases. I checked the file config.inc.php, but I forgot to take a look at mysql_clientdb.conf.

In short, i changed the MySQL root password, so I had to change it here too. This fixed my problems
Reply With Quote
The Following User Says Thank You to jorizzzz For This Useful Post:
falko (29th September 2011)
Reply

Bookmarks

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
ISPConfig "backend" completely unfunctional after a restart Xaymar Installation/Configuration 2 20th December 2014 12:14
Email problem 'Cannot set my user or group id.' (using ISPConfig 3 + OpenSuSE 11.2) urosm Installation/Configuration 5 19th June 2010 23:41
can't send/receive mail fedora 12 - ispconfig 3 ev0css Installation/Configuration 9 17th May 2010 22:44
ISPConfig 3 Send/Receive mail not working. Acidut General 6 4th April 2010 12:24
Mail not working epicuniversal General 5 13th June 2009 09:24


All times are GMT +2. The time now is 04:43.


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