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 12th October 2012, 16:46
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default Unable to connect to the database

Hello.
First, a bit about my setup:
I followed one of the perfect server guides and all processes are on the same machine.
The Problem:
After a system restart, my ispconfig 3 installation throws the errors:
  • Unable to connect to the database
  • Unable to connect to the database:
Notice the difference of the ending colon between the two. I have checked the information in /usr/local/ispconfig/server/lib/config.inc.php and /usr/local/ispconfig/server/lib/mysql_clientdb.conf as suggested in other threads and that information is correct. I have verified this by trying to log into mysql directly with mysql -u user -p and then pasting in the password in those files above. There are no errors in /var/log/mysql.err nor an entries in /var/log/mysql.log so it appears, at least to me, that a connection is never made to the mysql server. I then did some searching around and in /var/log/ispconfig/cron.log there is
Code:
Found linux image: /boot/vmlinuz-3.2.0-31-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-31-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
Found memtest86+ image: /memtest86+.bin
done
PHP Warning:  mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 276
PHP Warning:  mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 278
PHP Warning:  mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 133
PHP Warning:  mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 135
Upon checking the file in question, I could not find any place within the file that sets the $clientdb_user and $clientdb_password variables.
What do I need to do to fix this problem and, if you wouldn't mind at least speculating, what caused this issue in the first place? All was working fine until a system restart.
Reply With Quote
Sponsored Links
  #2  
Old 12th October 2012, 16:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

Please test your mysql server with this command:

mysql -h localhost -u root -p

and then enter the mysql root password from the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 12th October 2012, 17:26
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Testing with mysql -h localhost -u root -p and then pasting in the password that is in /usr/local/ispconfig/server/libmysql_clientdb.conf allows me to connect:
Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1612
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
Reply With Quote
  #4  
Old 12th October 2012, 17:46
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

Pk, then the errors in the log are most likely old and have been fixed already, as the file /usr/local/ispconfig/server/libmysql_clientdb.conf conatins the variables with the passwords that are used in the file /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php to connect to the server when a client new database is created in ispconfig.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 12th October 2012, 17:49
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

They are not old. I've deleted the entries in the log and tried to create a new client database and after the job goes through the queue, I get those errors stated above in the log again, with a current timestamp.
Reply With Quote
  #6  
Old 12th October 2012, 17:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

Do you use any special chars in your mysql password, if yes, change it to use only A-z a-z and numbers and tra again.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 12th October 2012, 17:54
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

No special characters. It is an alphanumeric password.
Reply With Quote
  #8  
Old 12th October 2012, 17:57
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

And you use ispconfig 3.0.4.6 and have not modified any sourcecode or installed any third party plugins or addons in ispconfig?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 12th October 2012, 18:12
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I am using ispconfig 3.0.4.6 (per the html title of the admin pages) and have not modified any sourcecode nor installed any 3rd party plugins or addons.
Reply With Quote
  #10  
Old 13th October 2012, 20:44
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
 
Default

According to je error message, the mysql password is empty but you said it is not empty and no files were altered, so maybe a file got corrupted. You should ownload the latest ispconfig again, unpack it and run the update.php script ehich is in he intall folder. Choose to reconfigure services during update.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
ispconfig3, mysql

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 1 22nd August 2011 22:31
Email problem 'Cannot set my user or group id.' (using ISPConfig 3 + OpenSuSE 11.2) urosm Installation/Configuration 5 19th June 2010 22:41
can't send/receive mail fedora 12 - ispconfig 3 ev0css Installation/Configuration 9 17th May 2010 21:44
ISPConfig 3 Send/Receive mail not working. Acidut General 6 4th April 2010 11:24
Forbidden 403; Samba access; config of maildeamon fawkes Installation/Configuration 4 14th January 2010 18:16


All times are GMT +2. The time now is 01:19.


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