MySQL Server startet nicht

Apache, Lighttpd, nginx, Cherokee
befla
Posts: 7
Joined: 2015-03-02 19:00

MySQL Server startet nicht

Post by befla » 2016-06-09 23:51

Hallo zusammen,
ich hoffe ich bin hier richtig denn seit Tagen komme ich einfach nicht weiter.
Mein MySQL Server will seit Tagen nicht starten. Die LOG-File gibt mir

Code: Select all

InnoDB: Attempted to open a previously opened tablespace. Previous tablespace befla_testdb/rxl07nss_20_postmeta uses space ID: 1064196 at filepath: ./befla_testdb/rxl07nss_20_postmeta.ibd. Cannot open tablespace befla1db1/rxl07nss_20_postmeta which uses space ID: 1064196 at filepath: ./befla1db1/rxl07nss_20_postmeta.ibd
2016-06-08 08:39:07 7f237adaa780  InnoDB: Operating system error number 2 in a file operation.
Ein Zurücksetzen der Datenbanken hat nicht geholfen. Im Gegenteil, es wurde noch schlimmer. Mittlerweile wurde der /var/lib/mysql Ordner vollständig geleert. Ich hab zwar ein Backup "mysql.daily.dump.0.gz", denke aber, dass das eher ein Backup von Plesk ist. Somit gehe ich davon aus, dass (hoffentlich vorerst) alle Datenbanken gelöscht sind.
Ich komme einfach nicht weiter, weiss nicht wie ich den MySQL Server wieder starten und die Datenbanken wiederherstellen kann. Notfalls müsste ich ein Backup vom Januar einspielen. Ich hoffe sehr, dass mir hier jemand helfen kann. Vielen Dank.

Code: Select all

/$ uname -a
Linux servidor22.befla.com.mx 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux
/$ cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="https://bugs.debian.org/"
12.5.30 debian8.0.build1205150826.19
/$ cat /etc/*version
8.2
/$ cat /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09)

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL Server startet nicht

Post by Joe User » 2016-06-10 00:10

Code: Select all

[root@devnoip:~] # perror 2
No such file or directory
Wenn /var/lib/mysql der Speicherort für die Datenbanken war und nun leer ist, dann sind die Datenbanken weg. Bliebe die Frage nach dem Warum. Hast Du (oder ein Script) versehentlich zuviel gelöscht?
Poste bitte mal Deine my.cnf und den Inhalt des MySQL-Logdir (ich gehe mal von /var/log/mysql aus, bitte bei Bedarf selbst anpassen):

Code: Select all

ls -alh /var/log/mysql
Ich befürchte fast, dass Du das Backup benötigen wirst :(
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

befla
Posts: 7
Joined: 2015-03-02 19:00

Re: MySQL Server startet nicht

Post by befla » 2016-06-10 05:36

Code: Select all

160609 12:31:25 [Note] InnoDB: Using mutexes to ref count buffer pool pages
160609 12:31:25 [Note] InnoDB: The InnoDB memory heap is disabled
160609 12:31:25 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
160609 12:31:25 [Note] InnoDB: Memory barrier is not used
160609 12:31:25 [Note] InnoDB: Compressed tables use zlib 1.2.8
160609 12:31:25 [Note] InnoDB: Using Linux native AIO
160609 12:31:25 [Note] InnoDB: Using CPU crc32 instructions
160609 12:31:25 [Note] InnoDB: Initializing buffer pool, size = 128.0M
160609 12:31:25 [Note] InnoDB: Completed initialization of buffer pool
160609 12:31:25 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
160609 12:31:25 [ERROR] Plugin 'InnoDB' init function returned error.
160609 12:31:25 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160609 12:31:25 [ERROR] Unknown/unsupported storage engine: InnoDB
160609 12:31:25 [ERROR] Aborting

160609 12:31:25 [Note] /usr/sbin/mysqld: Shutdown complete

befla
Posts: 7
Joined: 2015-03-02 19:00

Re: MySQL Server startet nicht

Post by befla » 2016-06-10 05:39

Code: Select all

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.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
open_files_limit = 1024000

[mysqld]
bind-address = localhost
skip_name_resolve
local-infile=0
open_files_limit = 1024000
#
# * 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
lc-messages-dir	= /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#
# * Fine Tuning
#
key_buffer		= 256M
max_allowed_packet	= 512M
thread_stack		= 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit	= 2M
query_cache_size        = 64M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log      = 1
#long_query_time = 2
#log_queries_not_using_indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * 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!
#
# * 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	= 512M

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

[isamchk]
key_buffer		= 128M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

befla
Posts: 7
Joined: 2015-03-02 19:00

Re: MySQL Server startet nicht

Post by befla » 2016-06-11 04:30

Hat hier wirklich niemand das Know-How?

AWOHille
Posts: 271
Joined: 2011-09-05 09:00

Re: MySQL Server startet nicht

Post by AWOHille » 2016-06-11 10:33

Kopiere doch erst mal ein aktuelles Backup nach /var/lib/mysql. Dann sollte der mysql Server wieder starten. Anschließend würde ich schauen, warum das Verzeichnis geleert wurde.

befla
Posts: 7
Joined: 2015-03-02 19:00

Re: MySQL Server startet nicht

Post by befla » 2016-06-11 18:40

Das hatte ich schon versucht, klappt aber trotzdem nicht.
Mir wurde zwischenzeitlich empfohlen MariaDB zu löschen und MySQL neu zu installieren.
/$ apt-get remove mysql-server mysql-client
Reading package lists...
Building dependency tree...
Reading state information...
Package 'mysql-client' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 126 not upgraded.
/$ apt-get autoremove
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 126 not upgraded.
/$ apt-get install mysql-server-5.5
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mysql-server-5.5 : Depends: mysql-client-5.5 (>= 5.5.49-0+deb8u1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL Server startet nicht

Post by Joe User » 2016-06-11 18:50

Code: Select all

apt-get install mysql-client-5.5
apt-get install mysql-server-5.5
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

befla
Posts: 7
Joined: 2015-03-02 19:00

Re: MySQL Server startet nicht

Post by befla » 2016-06-11 19:04

Mittlerweile kommen auch keine Mails mehr an
Jun 11 11:37:51 servidor22 postfix/tlsmgr[23708]: warning: btree:/var/lib/postfix/smtpd_scache is unavailable. open database /var/lib/postfix/smtpd_scache.db: No space left on device
Jun 11 11:37:51 servidor22 postfix/tlsmgr[23708]: warning: btree:/var/lib/postfix/smtpd_scache is unavailable. open database /var/lib/postfix/smtpd_scache.db: No space left on device

befla
Posts: 7
Joined: 2015-03-02 19:00

Re: MySQL Server startet nicht

Post by befla » 2016-06-11 19:05

apt-get install mysql-client-5.5 verursacht einen Verbindungsabbruch.
apt-get install mysql-server-5.5 gibt mir
/$ apt-get install mysql-server-5.5
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mysql-server-5.5 : Depends: mysql-client-5.5 (>= 5.5.49-0+deb8u1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: MySQL Server startet nicht

Post by Joe User » 2016-06-12 14:31

Deine /var Partition ist voll, das könnte auch Dein MySQL-Problem erklären.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.