
15th September 2011, 19:20
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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?
|

15th September 2011, 20:12
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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 22:12.
Reason: extra info
|

16th September 2011, 10:45
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
You might want to try raising the max_connections parameter in your my.cf file. Restart MySQL afterwards.
|

16th September 2011, 11:15
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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...
|

17th September 2011, 11:22
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Is this a physical server or a virtual machine? If you use OpenVZ, what's the output of
Code:
cat /proc/user_beancounters
?
|

28th September 2011, 09:04
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
Quote:
Originally Posted by falko
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
|

28th September 2011, 09:29
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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
|

28th September 2011, 10:02
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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?
|

28th September 2011, 10:31
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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
|
|
The Following User Says Thank You to jorizzzz For This Useful Post:
|
falko (29th September 2011)
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 21:16.
|
Recent comments
12 hours 4 min ago
21 hours 32 min ago
22 hours 22 min ago
1 day 1 hour ago
1 day 6 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 18 hours ago
1 day 23 hours ago
2 days 1 hour ago