HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Technical (http://www.howtoforge.com/forums/forumdisplay.php?f=8)
-   -   help with mysql connection problem please... (http://www.howtoforge.com/forums/showthread.php?t=11790)

shd0w 31st March 2007 06:14

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

Ben 31st March 2007 08:52

Is mySQLD still running?
Did you active the errorlog in your mysql to see if some errormessages are written there?

Beastcave 20th June 2007 02:11

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:)

falko 20th June 2007 15:45

You can enable the MySQL log in your my.cnf file (/etc/my.cnf or /etc/mysql/my.cnf). Restart MySQL afterwards.

Beastcave 20th June 2007 16:10

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

falko 21st June 2007 16:43

Can you post the output of
Code:

netstat -tap
?

Beastcave 21st June 2007 17:09

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

falko 22nd June 2007 13:44

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?

Beastcave 23rd June 2007 03:34

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

falko 24th June 2007 19:16

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?


All times are GMT +2. The time now is 18:56.

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