Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Probleme oder Fragen zur Installation, Update und Netzwerkanbindung
Antworten

Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Hallo an alle erst mal ein frohes neues Jahr,

leider fängt meines mit einem großen Problem an.

Ich bekomme plötzlich keinen Zugang mehr zur Mysql DB. Am 31.12.2019 habe ich noch gearbeitet und den Nummernkreis wie jedes Jahr neu eingestellt.

Nun komme ich heute nicht mehr drauf.

Ein mysql -uroot bringt:

Code: Alles auswählen

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

Gruß Xante

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Ich habe nun durch Neuaufsetzen versucht weiter zu kommen.

Leider bekomme ich keinen Zugriff auf meine Datenbank. Irgendwas ist passiert oder hat sich verändert.

Kann mir jemand auf die Sprünge helfen wie ich das einrichte? Eine Sicherung.sql habe ich. Ich bekomme die auch zurückgespielt.

Aber ich bekomme gar keine Verbindung zur DB.

Danke Gruß Xante

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Hallo Xante,

auch von mir ein gesundes neues Jahrzehnt in die Runde!!

'/var/run/mysqld/mysqld.sock' (2 "No such file or directory") sagt das die Maria nicht gestartet ist.
Somit kannst Du auch nicht drauf zugreifen!

Gib einmal das hier in der Konsole ein = service mysql status
Grüsse Detlef
______________________________________________________
CAO 1.5.0.41K
OsCommerce 2.3.1 aber nur als Katalog
10.1.37-MariaDB
Server Ubuntu Linux 16.04
Clienten 2 Ubuntu 16.04 Desktop mit Wine 4.0

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Hallo Detlef,

danke für deine Reaktion. Ich habe die Nacht aus Verzweiflung mehrfach mariadb neu aufgesetzt.

Was geht: Ich kann mit mysql -u root -p drauf, kann eine Datenbank anlegen und auch die Rücksicherung scheint zu funktionieren.

Auch habe ich bind-address = 0.0.0.0 gesetzt. Komisch war das ich die .cnf in /etc/mysql/mariadb.conf.d/50-server.cnf fand.

Cao Admin kommt nicht drauf.

service mysql status wirft das aus:

Code: Alles auswählen

● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
   Active: active (running) since Fri 2020-01-03 01:32:21 CET; 10h ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 30 (limit: 4915)
   CGroup: /system.slice/mysql.service
           ├─24073 /bin/bash /usr/bin/mysqld_safe
           ├─24229 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/x86_64-linux-gnu/mariadb18/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock -
           └─24230 logger -t mysqld -p daemon error

Jan 03 01:32:20 omv-office mysqld[24230]: 2020-01-03  1:32:20 139699777813888 [Note] InnoDB: 128 rollback segment(s) are active.
Jan 03 01:32:20 omv-office mysqld[24230]: 2020-01-03  1:32:20 139699777813888 [Note] InnoDB: Waiting for purge to start
Jan 03 01:32:21 omv-office mysqld[24230]: 2020-01-03  1:32:21 139699777813888 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.44-86.0 started; log sequence number 1616757
Jan 03 01:32:21 omv-office mysqld[24230]: 2020-01-03  1:32:21 139699777813888 [Note] Plugin 'FEEDBACK' is disabled.
Jan 03 01:32:21 omv-office mysqld[24230]: 2020-01-03  1:32:21 139699104511744 [Note] InnoDB: Dumping buffer pool(s) not yet started
Jan 03 01:32:21 omv-office mysqld[24230]: 2020-01-03  1:32:21 139699777813888 [Note] Server socket created on IP: '0.0.0.0'.
Jan 03 01:32:21 omv-office mysqld[24230]: 2020-01-03  1:32:21 139699777813888 [Note] /usr/sbin/mysqld: ready for connections.
Jan 03 01:32:21 omv-office mysqld[24230]: Version: '10.1.41-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.9
Jan 03 01:32:21 omv-office mysql[24044]: Starting MariaDB database server: mysqld.
Jan 03 01:32:21 omv-office systemd[1]: Started LSB: Start and stop the mysql database server daemon.
Vielleicht hast du noch einen Tip?

Danke Xante

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Hallo Xante,

sieht bei mir so aus :
root@mail:~# /etc/init.d/mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: active (running) since Fr 2020-01-03 11:17:26 CET; 2min 17s ago
Docs: man:systemd-sysv-generator(8)
Process: 2877 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 2909 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
Tasks: 29
Memory: 96.1M
CPU: 3.233s
CGroup: /system.slice/mysql.service
├─2940 /bin/bash /usr/bin/mysqld_safe
├─3155 /usr/sbin/mysqld --basedir=/usr --datadir=/srv/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/...
└─3156 logger -t mysqld -p daemon error

Jan 03 11:17:26 mail mysqld[3156]: 2020-01-03 11:17:26 139899801958144 [Note] InnoDB: Dumping buffer pool(s) not yet started
Jan 03 11:17:26 mail mysqld[3156]: 2020-01-03 11:17:26 139900768667904 [Note] Plugin 'FEEDBACK' is disabled.
Jan 03 11:17:26 mail mysqld[3156]: 2020-01-03 11:17:26 139900768667904 [Note] Server socket created on IP: '0.0.0.0'.
Jan 03 11:17:26 mail mysqld[3156]: 2020-01-03 11:17:26 139900768667904 [Note] Reading of all Master_info entries succeded
Jan 03 11:17:26 mail mysqld[3156]: 2020-01-03 11:17:26 139900768667904 [Note] Added new Master_info '' to hash table
Jan 03 11:17:26 mail mysqld[3156]: 2020-01-03 11:17:26 139900768667904 [Note] /usr/sbin/mysqld: ready for connections.
Jan 03 11:17:26 mail mysqld[3156]: Version: '10.1.37-MariaDB-1~xenial' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
Jan 03 11:17:26 mail mysql[2909]: ...done.
Jan 03 11:17:26 mail mysql[2909]: * Checking for corrupt, not cleanly closed and upgrade needing tables.
Jan 03 11:17:26 mail systemd[1]: Started LSB: Start and stop the mysql database server daemon.

Deine Mariadb läuft aber !!

Meine my.cnf sieht so aus :

# MariaDB database server configuration file.
#
# You can copy this file 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/serve ... ables.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
datadir = /srv/mysql
tmpdir = /tmp
lc_messages_dir = /usr/share/mysql
lc_messages = en_US
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.
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
#
# * Fine Tuning
#
max_connections = 100
connect_timeout = 5
wait_timeout = 600
max_allowed_packet = 16M
thread_cache_size = 128
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
#
# * MyISAM
#
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched. On error, make copy and try a repair.
myisam_recover_options = BACKUP
key_buffer_size = 128M
#open-files-limit = 2000
table_open_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M
#
# * Query Cache Configuration
#
# Cache only tiny result sets, so we can fit more in the query cache.
query_cache_limit = 128K
query_cache_size = 64M
# for more write intensive setups, set to DEMAND or OFF
#query_cache_type = DEMAND
#
# * 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 logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# we do want to know about network errors and such
log_warnings = 2
#
# Enable the slow query log to see queries with especially long duration
#slow_query_log[={0|1}]
slow_query_log_file = /var/log/mysql/mariadb-slow.log
long_query_time = 10
#log_slow_rate_limit = 1000
log_slow_verbosity = query_plan

#log-queries-not-using-indexes
#log_slow_admin_statements
#
# 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
#report_host = master1
#auto_increment_increment = 2
#auto_increment_offset = 1
#log_bin = /var/log/mysql/mariadb-bin
#log_bin_index = /var/log/mysql/mariadb-bin.index
# log_bin = /srv/mysql/mariadb-bin
log_bin_index = /srv/mysql/mariadb-bin.index
# not fab for performance, but safer
#sync_binlog = 1
# expire_logs_days = 10
# max_binlog_size = 100M
# slaves
#relay_log = /var/log/mysql/relay-bin
#relay_log_index = /var/log/mysql/relay-bin.index
#relay_log_info_file = /var/log/mysql/relay-bin.info
#log_slave_updates
#read_only
#
# If applications support it, this stricter sql_mode prevents some
# mistakes like inserting invalid dates etc.
#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
#
# * 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!
default_storage_engine = InnoDB
# you can't just change log file size, requires special procedure
#innodb_log_file_size = 50M
innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 400
innodb_flush_method = O_DIRECT
innodb_large_prefix = 1
innodb_file_format = Barracuda
innodb_file_per_table = 1

#
# * 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

#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

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

[isamchk]
key_buffer = 16M

#
# * 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/
Grüsse Detlef
______________________________________________________
CAO 1.5.0.41K
OsCommerce 2.3.1 aber nur als Katalog
10.1.37-MariaDB
Server Ubuntu Linux 16.04
Clienten 2 Ubuntu 16.04 Desktop mit Wine 4.0

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Hi, nach einem

Code: Alles auswählen

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'YOUR PASSWORD' WITH GRANT OPTION;
bin ich ein wenig weiter. Jetzt sagt CAO Admin:

Code: Alles auswählen

Der Server ist erreichbar, jedoch wurde der Zugriff verweigert !
Gruß Xante

P.S. Der Depp sitzt vorm PC. Natürlich muss mein Passwort rein :roll: :roll: :roll:

Aber warum sich die Datenbank zum Neujahr ausgeklinkt hatte werd ich wohl nicht erfahren.

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Na Bitte geht doch :lol:
Grüsse Detlef
______________________________________________________
CAO 1.5.0.41K
OsCommerce 2.3.1 aber nur als Katalog
10.1.37-MariaDB
Server Ubuntu Linux 16.04
Clienten 2 Ubuntu 16.04 Desktop mit Wine 4.0

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Danke für deine Unterstützung Detlef.

Ich mach mir ein wenig Sorge weil ich nicht weiß was es war. Warum von alleine die SQL DB nicht mehr erreichbar war.

Ich habe das Betriebssystem und die Mysql auf einer kleinen ssd laufen.

Kann ich da was schauen?

Gruß Xante

Re: Maria DB 10.1.41 plötzlich kein Zugriff mehr!!

Hallo Xante,

immer gerne wieder, ich würde mir die log Dateien von MySql und Auth.log und syslog mal genauer ansehen !!
Grüsse Detlef
______________________________________________________
CAO 1.5.0.41K
OsCommerce 2.3.1 aber nur als Katalog
10.1.37-MariaDB
Server Ubuntu Linux 16.04
Clienten 2 Ubuntu 16.04 Desktop mit Wine 4.0