Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st March 2007, 06:14
shd0w shd0w is offline
Junior Member
 
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default help with mysql connection problem please...

I installed ispconfig on my ubuntu server using the perfect setup howto and it worked perfectly for several days then I tried to log into the control panel and got the following error
Code:
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77

Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php:77) in /home/admispconfig/ispconfig/web/login/login.php on line 60
I have had the following problem before and i just reformated i would like to avoid doing anything drastic this time lol any help regarding this would be very much appreciated
Reply With Quote
Sponsored Links
  #2  
Old 31st March 2007, 08:52
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Is mySQLD still running?
Did you active the errorlog in your mysql to see if some errormessages are written there?
Reply With Quote
  #3  
Old 20th June 2007, 02:11
Beastcave Beastcave is offline
Junior Member
 
Join Date: Jun 2007
Location: Chatham, Ontario, Canada
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default What's the commands?

What is the commands for checking MySQL error or even a little how to set it up would be appreciated.

Thanks
B
Reply With Quote
  #4  
Old 20th June 2007, 15:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

You can enable the MySQL log in your my.cnf file (/etc/my.cnf or /etc/mysql/my.cnf). 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
  #5  
Old 20th June 2007, 16:10
Beastcave Beastcave is offline
Junior Member
 
Join Date: Jun 2007
Location: Chatham, Ontario, Canada
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Smile COnnection Errors with MySQL

Thanks Falko,

I was able to turn on the error log in /var/log/mysql/mysql.log and read it after i restarted the MySQL. Now I still keep getting this error same as shd0w. This is my mysql error. I had to refresh my website several times before I was able to read it.

Code:
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77

Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php:77) in /home/admispconfig/ispconfig/lib/classes/ispconfig_auth.lib.php on line 99
This is what I kept getting this and I checked the error log that I turned on. I couldn't find any errors with the log. It just states the commands of opening db and then quitting. Can I have more information on how to resolve this? If you need to read my logs, let me know which one and I'll post them here.

THanks!!
B
Reply With Quote
  #6  
Old 21st June 2007, 16:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Can you post the output of
Code:
netstat -tap
?
__________________
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
  #7  
Old 21st June 2007, 17:09
Beastcave Beastcave is offline
Junior Member
 
Join Date: Jun 2007
Location: Chatham, Ontario, Canada
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Thumbs up

Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:mysql  *:*               LISTEN     14573/mysqld
tcp        0      0 *:81      *:*               LISTEN     26842/ispconfig_htt
tcp        0      0 servername.mydomain.com :domain *:*   LISTEN     914/named
tcp        0      0 localhost.locald:domain *:*  LISTEN     914/named
tcp        0      0 *:smtp                  *:*    LISTEN     1690/master
tcp        0      0 localhost.localdoma:953 *:*    LISTEN     914/named
tcp6       0      0 *:imaps                 *:*        LISTEN     3507/couriertcpd
tcp6       0      0 *:pop3s                 *:*        LISTEN     3540/couriertcpd
tcp6       0      0 *:pop3                  *:*        LISTEN     3519/couriertcpd
tcp6       0      0 *:imap2                 *:*        LISTEN     3486/couriertcpd
tcp6       0      0 *:www                   *:*       LISTEN     26944/apache2
tcp6       0      0 *:ftp                   *:*          LISTEN     27903/proftpd: (acc
tcp6       0      0 *:ssh                   *:*         LISTEN     3642/sshd
tcp6       0      0 *:smtp                  *:*        LISTEN     1690/master
tcp6       0      0 ip6-localhost:953       *:*     LISTEN     914/named
tcp6       0      0 *:https                 *:*        LISTEN     26944/apache2
tcp6       0      0 servername.mydomain.com :ssh ::ffff:192.168.0.2:1408 ESTABLISHED26954/sshd: adminis
Thanks
B
Reply With Quote
  #8  
Old 22nd June 2007, 13:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

MySQL is running.
Did you maybe update MySQL after ISPConfig was installed? Maybe the MYSQL client code compiled during ISPConfig installation isn't copmpatible with your new MySQL version.
What's your MySQL version?
__________________
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
  #9  
Old 23rd June 2007, 03:34
Beastcave Beastcave is offline
Junior Member
 
Join Date: Jun 2007
Location: Chatham, Ontario, Canada
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Did you maybe update MySQL after ISPConfig was installed? Maybe the MYSQL client code compiled during ISPConfig installation isn't copmpatible with your new MySQL version.
I don't think I updated my MySQL. I followed exact what your how-to "The Perfect Setup - Unbuntu 6.10 Server" including the comments.

Quote:
Originally Posted by falko
What's your MySQL version?
Code:
mysql  Ver 14.12 Distrib 5.0.24a, for pc-linux-gnu (i486) using readline 5.1

Connection id:          880
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.24a-Debian_9ubuntu2-log
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 2 days 8 hours 4 min 54 sec

Threads: 1  Questions: 9948  Slow queries: 7  Opens: 190  Flush tables: 1  Open tables: 54  Queries per second avg: 0.049
B
Reply With Quote
  #10  
Old 24th June 2007, 19:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
 
Default

I see some Slow queries in your output. Usually this is a sign that MySQL needs to be optimized. Do you have a high server load?
__________________
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
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
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 16:33
postfix - MySQL connection problem epo Installation/Configuration 7 4th August 2006 20:49
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 11:30
MySQL connection problem cartdev Installation/Configuration 17 17th November 2005 22:30


All times are GMT +2. The time now is 11:59.


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