LINUX.ORG.RU
решено ФорумAdmin

Не запускается mysql на debian

 ,


0

1

Помогите пожалуйста решить проблему. Накосячил что-то в настройках и теперь не запускается mysql. Команда systemctl status mariadb.service

mariadb.service - MariaDB 10.1.44 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-04-03 04:39:54 UTC; 14s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 9451 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 9359 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_S
  Process: 9355 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 9352 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 9451 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Apr 03 04:39:51 myserver systemd[1]: Starting MariaDB 10.1.44 database server...
Apr 03 04:39:51 myserver mysqld[9451]: 2020-04-03  4:39:51 47075099974848 [Warning] option 'table_open_cache': unsigned value 4 adjusted to 10
Apr 03 04:39:51 myserver mysqld[9451]: 2020-04-03  4:39:51 47075099974848 [Note] /usr/sbin/mysqld (mysqld 10.1.44-MariaDB-0+deb9u1) starting as process 9451 ...
Apr 03 04:39:54 myserver systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 04:39:54 myserver systemd[1]: Failed to start MariaDB 10.1.44 database server.
Apr 03 04:39:54 myserver systemd[1]: mariadb.service: Unit entered failed state.
Apr 03 04:39:54 myserver systemd[1]: mariadb.service: Failed with result 'exit-code'.

Ответ на: комментарий от Anoxemian

В логах эти строки повторяются постоянно

Apr 03 03:22:52 myserver systemd[1]: mariadb.service: Failed to set invocation ID on control group /system.slice/mariadb.service, ignoring: Operation not permitted
Apr 03 03:22:52 myserver systemd[1]: Starting MariaDB 10.1.44 database server...
Apr 03 03:22:54 myserver mysqld[323]: 2020-04-03  3:22:54 46929620155584 [Warning] option 'table_open_cache': unsigned value 4 adjusted to 10
Apr 03 03:22:54 myserver mysqld[323]: 2020-04-03  3:22:54 46929620155584 [Note] /usr/sbin/mysqld (mysqld 10.1.44-MariaDB-0+deb9u1) starting as process 323 ...
Apr 03 03:22:58 myserver systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 03:22:58 myserver systemd[1]: Failed to start MariaDB 10.1.44 database server.
Есть подозрение что это все началось после того как логи были вычищены с сервера. Какие именно логи надо посмотреть чтоб понять причину?

mariaDB
() автор топика
Ответ на: комментарий от Anoxemian

В /etc/var/log/mysql/error.log

innodb_open_files should not be greater than the open_files_limit.
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: The InnoDB memory heap is disabled
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Compressed tables use zlib 1.2.8
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Using Linux native AIO
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Using SSE crc32 instructions
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Completed initialization of buffer pool
InnoDB: Warning: you must raise the value of innodb_open_files in
InnoDB: my.cnf! Remember that InnoDB keeps all log files and all system
InnoDB: tablespace files open for the whole time mysqld is running, and
InnoDB: needs to open also some .ibd files if the file-per-table storage
InnoDB: model is used. Current open files 1, max allowed open files 10.
InnoDB: Warning: you must raise the value of innodb_open_files in
InnoDB: my.cnf! Remember that InnoDB keeps all log files and all system
InnoDB: tablespace files open for the whole time mysqld is running, and
InnoDB: needs to open also some .ibd files if the file-per-table storage
InnoDB: model is used. Current open files 2, max allowed open files 10.
InnoDB: Warning: you must raise the value of innodb_open_files in
InnoDB: my.cnf! Remember that InnoDB keeps all log files and all system
InnoDB: tablespace files open for the whole time mysqld is running, and
InnoDB: needs to open also some .ibd files if the file-per-table storage
InnoDB: model is used. Current open files 3, max allowed open files 10.
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Highest supported file format is Barracuda.
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: 128 rollback segment(s) are active.
2020-04-03  5:39:30 47252516605120 [Note] InnoDB: Waiting for purge to start
2020-04-03  5:39:31 47252516605120 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 14667193
2020-04-03  5:39:31 47252516605120 [Note] Plugin 'FEEDBACK' is disabled.
2020-04-03  5:39:31 47252516605120 [Note] Recovering after a crash using tc.log
2020-04-03  5:39:31 47252516605120 [ERROR] Can't init tc log
2020-04-03  5:39:31 47252516605120 [ERROR] Aborting

mariaDB
() автор топика
Ответ на: комментарий от Anoxemian

Разобрался. Пересоздал tc.log и все запустилось.

mariaDB
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.