Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
hitam
Beiträge: 19
Registriert: 21.10.2013 17:46:26

Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von hitam » 02.07.2017 09:24:15

HAllo, auch bei mir gibt es Probleme mit mysql(d) nach dem Upgrade auf DEBIAN 9 auf meinem Cubietruck!
~ >mysqld
2017-07-02 8:53:00 3059908608 [Note] mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 2068

mit ps ax nachsehen; kein Prozess 2068 vorhanden.

/var/log/mysql >tail error.log
2017-07-02 8:53:01 3059908608 [Note] InnoDB: 128 rollback segment(s) are active.
2017-07-02 8:53:01 3059908608 [Note] InnoDB: Waiting for purge to start
2017-07-02 8:53:01 3059908608 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 2230581980
2017-07-02 8:53:01 2499801920 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-07-02 8:53:01 3059908608 [Note] Plugin 'FEEDBACK' is disabled.
2017-07-02 8:53:02 3059908608 [Note] Server socket created on IP: '127.0.0.1'.
2017-07-02 8:53:02 3059908608 [ERROR] Can't start server : Bind on unix socket: No such file or directory
2017-07-02 8:53:02 3059908608 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
2017-07-02 8:53:02 3059908608 [ERROR] Aborting


/var/run/mysqld/mysqld.sock - NICHT vorhanden!


/var/run >ll
total 52
-rw------- 1 root root 0 Jul 2 08:49 agetty.reload
-rw-r--r-- 1 root root 0 Jul 2 08:49 armbian-motd-updates.lock
drwxr-xr-x 2 root root 80 Jul 2 08:49 console-setup
-rw-r--r-- 1 root root 4 Jul 2 08:49 crond.pid
---------- 1 root root 0 Jul 2 08:49 crond.reboot
drwxr-xr-x 2 root root 60 Jul 2 08:49 dbus
lrwxrwxrwx 1 root root 25 Jul 2 08:49 initctl -> /run/systemd/initctl/fifo
drwxr-x--- 2 www-data www-data 40 Jul 2 08:49 lighttpd
-rw-r--r-- 1 root root 4 Jul 2 08:49 lighttpd.pid
drwxr-xr-x 2 root root 100 Jul 2 08:49 lirc
drwxrwxrwt 3 root root 100 Jul 2 08:49 lock
drwxr-xr-x 3 root root 60 Jul 2 08:49 log
-rw-r--r-- 1 root root 11 Jul 2 08:49 machine.id
-rw-r--r-- 1 root root 1673 Jul 2 08:54 motd.dynamic
drwxr-xr-x 2 root root 60 Nov 3 2016 mount
drwxr-xr-x 2 root root 120 Jul 2 08:49 network
-rw-r--r-- 1 root root 3 Jul 2 08:49 ntpd.pid
-rw-r--r-- 1 root root 3 Jul 2 08:49 php5-fpm.pid
srw-rw---- 1 www-data www-data 0 Jul 2 08:49 php5-fpm.sock
drwxr-xr-x 2 root root 40 Jul 2 08:49 proftpd
-rw-r--r-- 1 root root 6440 Jul 2 08:49 proftpd.delay
-rw-r--r-- 1 root root 4 Jul 2 08:49 proftpd.pid
-rw-r--r-- 1 root root 16 Jul 2 08:49 proftpd.scoreboard
-rw-r--r-- 1 root root 0 Jul 2 08:49 proftpd.scoreboard.lck
-rw-r--r-- 1 root root 3 Jul 2 08:49 rsyslogd.pid
drwxrwxr-x 2 root utmp 40 Jul 2 08:49 screen
drwxr-xr-x 2 root root 40 Jul 2 08:49 sendsigs.omit.d
lrwxrwxrwx 1 root root 8 Jul 2 08:49 shm -> /dev/shm
drwxr-xr-x 2 root root 40 Jul 2 08:49 sshd
-rw-r--r-- 1 root root 4 Jul 2 08:49 sshd.pid
drwxr-xr-x 16 root root 400 Jul 2 08:49 systemd
drwxr-xr-x 2 root root 60 Nov 3 2016 tmpfiles.d
drwxr-xr-x 7 root root 160 Jul 2 08:55 udev
drwxr-xr-x 3 root root 60 Jul 2 08:51 user
-rw-rw-r-- 1 root utmp 2304 Jul 2 08:54 utmp


An den Config Dateien habe ich nichts geändert, die sind so wie sie vom system installiert wurden!

lrwxrwxrwx 1 root root 22 Jul 1 14:48 my.cnf -> /etc/mysql/mariadb.cnf

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# 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.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

Der Inhalt von /lib/systemd/system/mariadb.service:
#
# /etc/systemd/system/mariadb.service
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Thanks to:
# Daniel Black
# Erkan Yanar
# David Strauss
# and probably others

[Unit]
Description=MariaDB database server
After=network.target

[Install]
WantedBy=multi-user.target
Alias=mysql.service
Alias=mysqld.service


[Service]

##############################################################################
## Core requirements
##

Type=notify

# Setting this to true can break replication and the Type=notify settings
# See also bind-address mysqld option.
PrivateNetwork=false

##############################################################################
## Package maintainers
##

User=mysql
Group=mysql

# To allow memlock to be used as non-root user if set in configuration
CapabilityBoundingSet=CAP_IPC_LOCK

# Prevent writes to /usr, /boot, and /etc
ProtectSystem=full

# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true

PrivateDevices=true

# Prevent accessing /home, /root and /run/user
ProtectHome=true

# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true

ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld

# Perform automatic wsrep recovery. When server is started without wsrep,
# galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status.
# It is always safe to unset _WSREP_START_POSITION environment variable.
# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \
&& systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"

# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql_install_db -u mysql

# Start main service
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
# Use the [service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
ExecStartPost=/etc/mysql/debian-start

# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"

KillMode=process
KillSignal=SIGTERM

# Don't want to see an automated SIGKILL ever
SendSIGKILL=no

# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s

UMask=007

##############################################################################
## USERs can override
##
##
## by creating a file in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
## and adding/setting the following will override this file's settings.

# Useful options not previously available in [mysqld_safe]

# Kernels like killing mysqld when out of memory because its big.
# Lets temper that preference a little.
# OOMScoreAdjust=-600

# Explicitly start with high IO priority
# BlockIOWeight=1000

# If you don't use the /tmp directory for SELECT ... OUTFILE and
# LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
PrivateTmp=false

##
## Options previously available to be set via [mysqld_safe]
## that now needs to be set by systemd config files as mysqld_safe
## isn't executed.
##

# Number of files limit. previously [mysqld_safe] open-file-limit
LimitNOFILE=16364

# Maximium core size. previously [mysqld_safe] core-file-size
# LimitCore=

# Nice priority. previously [mysqld_safe] nice
# Nice=-5

# Timezone. previously [mysqld_safe] timezone
# Environment="TZ=UTC"

# Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
# (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
# Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=

# Flush caches. previously [mysqld_safe] flush-caches=1
# ExecStartPre=sync
# ExecStartPre=sysctl -q -w vm.drop_caches=3

# numa-interleave=1 equalivant
# Change ExecStart=numactl --interleave=all /usr/sbin/mysqld......

# crash-script equalivent
# FailureAction=

Der Versuch mit:

mariadb
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

resultiert in der gennanten fehlermeldung!

Bin ziemlich ratlos, da kein mysql Experte!

Wer hilft mir um mysql(d) (mariadb) wieder zum laufen zu bringen ??

Vielen Dank im Voraus!

Gruß, Hitam
Lenovo W540, 32 GB, 2 TB HDD,UBUNTU 18.04 LTS
Server 32 GB, 4 Core, DEBIAN Stretch 9.9 AMD64

mtheiss
Beiträge: 154
Registriert: 01.04.2005 22:07:26
Lizenz eigener Beiträge: MIT Lizenz

Re: Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von mtheiss » 03.07.2017 23:47:54

Hallo,

was sagt denn "systemctl status mariadb.service" und ist bei "systemd-delta" irgendwas auffälliges?

Gruss
Martin

Benutzeravatar
beLI3VeR
Beiträge: 535
Registriert: 30.08.2005 16:56:43
Lizenz eigener Beiträge: MIT Lizenz
Kontaktdaten:

Re: Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von beLI3VeR » 04.07.2017 07:56:42

Bitte hitam die Code Blocks Nutzen!

Debian 9 nutzt kein MySQL mehr sondern MariaDB.
Eigentlich sollte der wechsel sauber laufen, was wohl bei dir nicht der Fall war.

Was sagt folgendes Befehl:

Code: Alles auswählen

apt install mariadb-server mariadb-client
Lieben Gruß
beLI3VeR

hitam
Beiträge: 19
Registriert: 21.10.2013 17:46:26

Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht - III

Beitrag von hitam » 25.07.2017 09:33:36

Beide Pakete Version (10.1.23-9+deb9u1) sind installiert!

Ebenso mysql Version (5.5.9999+default)

Gruß, hitam
Lenovo W540, 32 GB, 2 TB HDD,UBUNTU 18.04 LTS
Server 32 GB, 4 Core, DEBIAN Stretch 9.9 AMD64

hitam
Beiträge: 19
Registriert: 21.10.2013 17:46:26

Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht - III

Beitrag von hitam » 25.07.2017 09:39:15

Beide Pakete Version (10.1.23-9+deb9u1) sind installiert!

Ebenso mysql Version (5.5.9999+default)

Code: Alles auswählen

/usr/sbin/mysqld --user=mysql
2017-07-25  9:36:59 140455866602048 [Note] /usr/sbin/mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 22223 ...
Abgebrochen
systemctl status mariadb.service

Code: Alles auswählen

● mariadb.service - MariaDB database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: signal) since Tue 2017-07-25 09:43:12 CEST; 3s ago
  Process: 29202 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
  Process: 29110 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION
  Process: 29105 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 29103 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 29202 (code=killed, signal=ABRT)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/mariadb.service

Jul 25 09:43:12 srv01 systemd[1]: Failed to start MariaDB database server.
Jul 25 09:43:12 srv01 systemd[1]: mariadb.service: Unit entered failed state.
Jul 25 09:43:12 srv01 systemd[1]: mariadb.service: Failed with result 'signal'.






Gruß, hitam
Lenovo W540, 32 GB, 2 TB HDD,UBUNTU 18.04 LTS
Server 32 GB, 4 Core, DEBIAN Stretch 9.9 AMD64

wolfn
Beiträge: 30
Registriert: 03.07.2017 17:49:46

Re: Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von wolfn » 25.07.2017 23:09:39

Ich hab das jetzt nur vage im Hinterkopf:
In den Release-notes zu Stretch gibt es eine ausführliche Seite zu dem Problem mysql -> mariadb.
Da ist auch die Rede von gewissen Inkompatibilitäten einiger Tabellen - mußt Du nachlesen, ob das auf Dich zutrifft.

Deinem Posting entnehme ich aber, daß Du mariadb UND mysql installiert hast. Das beißt sich vermutlich gewaltig. Ich vermute, daß hier der Hase im Pfeffer liegt.

hitam
Beiträge: 19
Registriert: 21.10.2013 17:46:26

Re: Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von hitam » 26.07.2017 15:12:46

@wolfn die Deinstallation von mariadb brachte keine Änderung! Fehler besteht noch immer!

Auch bei Deinstallation von mysql und Installation von mariadb funktioniert der SQl Datenbank Server nicht!

Gruß hitam
Lenovo W540, 32 GB, 2 TB HDD,UBUNTU 18.04 LTS
Server 32 GB, 4 Core, DEBIAN Stretch 9.9 AMD64

wolfn
Beiträge: 30
Registriert: 03.07.2017 17:49:46

Re: Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von wolfn » 27.07.2017 12:26:14

Naja, da ist Ferndiagnose für mich schwierig, weil ich hier kein vergleichbares System am Laufen habe.

Du solltest aber unbedingt die Releasenotes lesen und die Hinweise auch befolgen, soweit zutreffend.

Auch solltest Du Deine Config-Dateien inspizieren, ob da Änderungen erforderlich sind.

Evtl. hat hier noch ein Profi ein paar Tips parat...

Edit: gerade gefunden: https://mariadb.com/kb/en/mariadb/maria ... atibility/

hitam
Beiträge: 19
Registriert: 21.10.2013 17:46:26

Re: Nach Upgrade auf DEBIAN 9: MYSQL Startet nicht

Beitrag von hitam » 27.07.2017 18:39:33

HAllo,

ich bedanke mich bei allen für Ihre Unterstützung. ich habe DEBIAN 9.1 komplett neu installiert und dann alle Anwendungen dazu.
Jetzt funktioniert alles wie es soll! Als Datenbank benutze ich sqlite3, damit gehe ich dem Theater mit mysql / mariadb aus dem Weg ! Vielleicht migriere ich später mal zu mariadb!

Danke !

Lieben Gruß, Hitam
Lenovo W540, 32 GB, 2 TB HDD,UBUNTU 18.04 LTS
Server 32 GB, 4 Core, DEBIAN Stretch 9.9 AMD64

Antworten