View previous topic :: View next topic |
Author |
Message |
gK Guru
Joined: 31 Jul 2002 Posts: 319 Location: France
|
Posted: Wed Oct 13, 2004 12:23 pm Post subject: MySQL regularly crashes |
|
|
Hello,
My MySQL server regularly crashes.
/var/log/mysql/mysql.err
Code: |
041011 15:36:23 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line
041012 07:44:51 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line
041013 14:04:41 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line
041013 14:04:41 Can't start server: Bind on TCP/IP port: Address already in use
041013 14:04:41 Do you already have another mysqld server running on port: 3306 ?
041013 14:04:41 Aborting
041013 14:04:41 /usr/sbin/mysqld: Shutdown Complete
041013 14:04:41 mysqld ended
041013 14:05:35 mysqld ended
|
/var/log/mysql/mysqld.err
Code: |
040920 13:05:25 /usr/sbin/mysqld: Shutdown Complete
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
041006 18:20:07 Aborted connection 133 to db: 'phorum' user: 'gk' host: `localhost' (Got an error reading communication packets)
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
/usr/sbin/mysqld: ready for connections.
Version: '4.0.20' socket: '/var/run/mysqld/mysqld.sock' port: 3306
|
/var/log/mysql/mysql.log contains nothing.
Code: |
srvbox # ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1360 480 ? S Oct12 0:04 init [3]
root 2 0.0 0.0 0 0 ? S Oct12 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SN Oct12 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? S Oct12 0:02 [kswapd]
root 5 0.0 0.0 0 0 ? S Oct12 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? S Oct12 0:00 [kupdated]
root 7 0.0 0.0 0 0 ? S Oct12 0:00 [kjournald]
root 19334 0.0 0.2 1732 876 ? Ss Oct12 0:00 /sbin/devfsd /dev
root 30595 0.0 0.0 0 0 ? S Oct12 0:01 [kjournald]
root 16749 0.0 0.1 1492 600 ? Ss Oct12 0:00 metalog [MASTER]
root 22906 0.0 0.1 1452 476 ? S Oct12 0:00 metalog [KERNEL]
root 7527 0.0 0.3 3292 1420 ? Ss Oct12 0:00 /usr/sbin/sshd
ntp 12871 0.0 0.9 3704 3704 ? SLs Oct12 0:03 /usr/bin/ntpd -p /var/run/ntpd.pid -u ntp:ntp
root 19445 0.0 0.2 5044 972 ? Ss Oct12 0:00 pure-ftpd (SERVER)
root 24916 0.0 0.1 1536 632 ? Ss Oct12 0:00 /usr/sbin/cron
root 28248 0.0 0.1 1408 576 vc/1 Ss+ Oct12 0:00 /sbin/agetty 38400 tty1 linux
root 13214 0.0 0.1 1424 576 vc/2 Ss+ Oct12 0:00 /sbin/agetty 38400 tty2 linux
root 21117 0.0 0.1 1388 572 vc/3 Ss+ Oct12 0:00 /sbin/agetty 38400 tty3 linux
root 9125 0.0 0.2 2176 1140 ? Ss Oct12 0:00 login -- gk
root 30902 0.0 0.3 2208 1196 ? Ss Oct12 0:00 login -- gk
root 25104 0.0 0.1 1436 572 vc/5 Ss+ Oct12 0:00 /sbin/agetty 38400 tty5 linux
gk 15551 0.0 0.4 2644 1560 ? Ss Oct12 0:02 SCREEN
gk 23358 0.0 0.3 2188 1328 pts/1 Ss Oct12 0:00 -/bin/bash
gk 27324 0.0 0.3 2220 1328 pts/2 Ss Oct12 0:00 -/bin/bash
gk 8650 0.0 0.3 2200 1328 pts/3 Ss Oct12 0:00 -/bin/bash
root 19050 0.1 0.4 6104 1896 ? Ss 14:04 0:00 sshd: root@pts/0
root 30328 0.0 0.3 2160 1292 pts/0 Ss 14:04 0:00 -bash
root 4023 0.0 1.3 12856 5172 ? Ss 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 4455 0.0 1.1 12536 4260 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 19376 0.0 1.7 14184 6844 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 17071 0.0 1.3 12992 5324 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 19393 0.0 1.3 12856 5208 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 19390 0.0 1.3 12856 5208 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 11234 0.0 1.3 12856 5208 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
apache 19388 0.0 1.3 12856 5208 ? S 14:06 0:00 /usr/sbin/apache2 -k start -D PHP4
root 23985 0.0 0.2 2352 788 pts/0 R+ 14:16 0:00 ps aux
srvbox root # /etc/init.d/mysql start
* WARNING: "mysql" has already been started.
srvbox root # /etc/init.d/mysql stop
* Stopping mysqld... [ !! ]
srvbox root # /etc/init.d/mysql restart
* Stopping mysqld... [ !! ]
srvbox root #
|
When connecting to the forum via http :
Code: |
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/gk/public_html/forum/include/db/mysql.php on line 3025
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/gk/public_html/forum/include/db/mysql.php on line 3026
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gk/public_html/forum/include/db/mysql.php on line 902
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/gk/public_html/forum/include/db/mysql.php on line 904
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2): select * from phorum_settings
|
Code: |
* dev-db/mysql
Latest version available: 4.0.20-r1
Latest version installed: 4.0.20-r1
* net-www/apache
Latest version available: 2.0.51-r1
Latest version installed: 2.0.51-r1
|
Can you help me ? What am I supposed to do ?
It seems that mysqld crashed because of 'phorum' (http://phorum.org) but I'm not sure there is a link. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Oct 13, 2004 7:26 pm Post subject: |
|
|
Hmmm, never really seen mysql do that. On the odd case it's a weird library thing I would try:
emerge php, so that it builds against the latest mysql libs you have installed. 20-r1 is pretty new so it's likely you built against .20
restart mysql
restart apache
Hopefully that'll clear it up.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
|