Mysql nem indul

Fórumok

Sziasztok!

Webszerveren leállt a mysql miután a szolgáltató hibásan átirányította más IP-címre a domain nevünket.
Ahogy újra akarom indítani, a következő hibauzenetet kapom:

/etc/init.d# ./mysql start
Starting MySQL database server: mysqld./mysql: line 114: 24832 Segmentation fault sleep 1

PHPMyAdminnal a következőt kapom belepesnel:

#2002 - A szerver nem válaszol (vagy a helyi MySQL szerver socketje nincs rendesen beállítva)

Mi lehet a hiba? Miert nem indul? Hogy tudnam valahogy ujra elinditani?
Ha nem lehet sehogy, akkor hogy tudok minden fontos adatot kimenteni?

Elore is koszonom!

Fgoyo

Hozzászólások

Az err logot kéne megnézni.

--
trey @ gépház

Hibaüzenet/logok nélkül lottó tipp: Mi lenne ha nem domainnel, hanem IP címmel mennél a mysql kiszolgáló felé ? Talán megtalálnád...

sziasztok!
koszi a valaszokat, a var/log/mysql.err ures, illetve a mysql.log is....
csatolom a my.conf file-t, hatha segitseg...:
The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
set-variable=max_connections=500
#
# For compatibility to other Debian packages that still use
# libmysqlclient10 and libmysqlclient12.
old_passwords = 1
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
#
# * Query Cache Configuration
#
query_cache_limit = 1048576
query_cache_size = 16777216
query_cache_type = 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * BerkeleyDB
#
# According to an MySQL employee the use of BerkeleyDB is now discouraged
# and support for it will probably cease in the next versions.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the ndbd storage daemons,
# not from the ndb_mgmd management daemon.
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1

A parancssori inditast mar probaltam, nem megy, a következő hibat irja ki:
/etc/init.d# sudo mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
./mysql start
Starting MySQL database server: mysqld./mysql: line 114: 14005 Segmentation fault sleep 1

A syslog-ban a kovetkezoket talaltam:

File: syslog Col 0 485250105 bytes 1%
tiszk-fw mysqld_safe[3991]: Fatal error: Can't remove the pid file: /var/run/mysqld/mysqld.pid
tiszk-fw mysqld_safe[3999]: Please remove it manually and start /usr/bin/mysqld_safe again
tiszk-fw mysqld_safe[4001]: mysqld daemon not started

Inditsd el siman mysqld paranccsal, akkor arra a konzolra fognak jonni az uzenetek. Paraszt megoldas, de mukodik.

/etc/init.d# mysqld
090922 15:31:23 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
090922 15:31:23 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 2054030.
InnoDB: Doing recovery: scanned up to log sequence number 0 2054030
InnoDB: Last MySQL binlog file position 0 48131442, file name /var/log/mysql/mys ql-bin.000033
090922 15:31:24 InnoDB: Started; log sequence number 0 2054030
090922 15:31:24 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
090922 15:31:24 [Note] Starting crash recovery...
090922 15:31:24 [Note] Crash recovery finished.
090922 15:31:24 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign r equested address
090922 15:31:24 [ERROR] Do you already have another mysqld server running on por t: 3306 ?
090922 15:31:24 [ERROR] Aborting

090922 15:31:24 InnoDB: Starting shutdown...
090922 15:31:26 InnoDB: Shutdown completed; log sequence number 0 2054030
090922 15:31:26 [Note] mysqld: Shutdown complete

/etc/init.d# netstat -tuepan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 0 9702 4113/(squid)
tcp 0 0 0.0.0.0:1723 0.0.0.0:* LISTEN 0 9597 4056/pptpd
udp 0 0 0.0.0.0:32768 0.0.0.0:* 13 9674 4113/(squid)
udp 0 0 0.0.0.0:3130 0.0.0.0:* 0 9703 4113/(squid)
/etc/init.d# netstat -tuepan|grep :3306
/etc/init.d#

Hülyén hangzik, de nekem ububtu szerver alatt (az is hülye aki azt használ) fordult elő ilyen költöztetés után. Az volt a gond, hogy a socket könyvtár nem volt írható a mysql felhasználó számára. Azaz nem nyitott neki socket-et.

Selinuxtol nem lehet itt...
Ami érdekes, hogy az egész hiba azután adódott, hogy a domain nevünket, egy másik IP-re iranyitottal at. Rögtön ezután következett be a hiba...miután visszakerült a domain a sajat IP-re, a webszerver hibat jelzett, hogy nem tud a mysql-hez csatlakozni...

Lehet az a baj, hogy a mysqld csak localhoston fogadja a kéréseket, conf.jában át kell vésni hogy kivűlről is fogadjon connectet?

---------------------------------------------------------------------------------------
Az első platformfüggetlen virtualizációs rendezvény : http://www.virtualization-day.com

Leellenőrzöd h biztos nem fut a MySQL, pid file nincs, socket nem foglalt, és

strace -o /tmp/mysql.out -f /usr/bin/mysqld_safe

majd átbogarászod a /tmp/mysql.out-ot :)