LINUX.ORG.RU

Не стартует mysql

 ,


0

2

Здравствуйте. Не стартует mysql сервер:

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

systemctl status mariadb.service:

● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-03-04 09:55:46 MSK; 18s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 4206 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=127)
      CPU: 0

Подскажите, в чем может быть проблема?


See «systemctl status mariadb.service» and «journalctl -xe» for details.

???

Anoxemian ★★★★★
()

Не стартует mysql сервер
mariadb.service - MariaDB 10.1.37 database server

Все-таки это не MySQL, а MariaDB. Не совсем одно и то же.

See «systemctl status mariadb.service» and «journalctl -xe» for details.
and
and
and

Вам тут уже намекнули, но раз уж вы не даете оснований понять, что поняли намек, разверну: где вывод «journalctl -xe»?

Borifed
()
Ответ на: комментарий от Borifed

journalctl -xe

Mar 04 21:24:47 cs47792 systemd[1]: Starting MariaDB 10.1.37 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
Mar 04 21:24:47 cs47792 systemd[1]: mariadb.service: Control process exited, code=exited status=127
Mar 04 21:24:47 cs47792 systemd[1]: Failed to start MariaDB 10.1.37 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Mar 04 21:24:47 cs47792 systemd[1]: mariadb.service: Unit entered failed state.
Mar 04 21:24:47 cs47792 systemd[1]: mariadb.service: Failed with result 'exit-code'.
wirtor
() автор топика
Ответ на: комментарий от sigurd

mysql_install_db --user=mysql

Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
2019-03-04 21:20:07 140665113400448 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 12525 ...
OK
Filling help tables...
2019-03-04 21:20:11 140319090070656 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 12554 ...
OK
Creating OpenGIS required SP-s...
2019-03-04 21:20:14 140363753497728 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 12583 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h cs47792 password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

После этого, все та же ошибка.

wirtor
() автор топика

это одна из причин, почему я для своих проектов беру постгрю

bvn13 ★★★★★
()
Ответ на: комментарий от darkenshvein

Содержимое /var/log/mysql/error.log

2019-03-04 21:20:07 140665113400448 [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.

2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Using Linux native AIO
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Using SSE crc32 instructions
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Completed initialization of buffer pool
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-04 21:20:08 140665113400448 [Note] InnoDB: Waiting for purge to start
2019-03-04 21:20:08 140665113400448 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.41-84.1 started; log sequence number 1616727
2019-03-04 21:20:08 140664503269120 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-03-04 21:20:11 140319090070656 [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.

2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Using Linux native AIO
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Using SSE crc32 instructions
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Completed initialization of buffer pool
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-04 21:20:11 140319090070656 [Note] InnoDB: Waiting for purge to start
2019-03-04 21:20:11 140319090070656 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.41-84.1 started; log sequence number 1616737
2019-03-04 21:20:11 140318481577728 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-03-04 21:20:14 140363753497728 [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.

2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Using Linux native AIO
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Using SSE crc32 instructions
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Completed initialization of buffer pool
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-04 21:20:14 140363753497728 [Note] InnoDB: Waiting for purge to start
2019-03-04 21:20:14 140363753497728 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.41-84.1 started; log sequence number 1616747
2019-03-04 21:20:14 140363134138112 [Note] InnoDB: Dumping buffer pool(s) not yet started
wirtor
() автор топика
Ответ на: mysql_install_db --user=mysql от wirtor

Это нужно было сделать ДО запуска mysqld. Если вы запускали mysql, не проинициализировав базы - в /var/lib/mysql создались файлы c неправильными правами (и пользователями). Они мешают правильной работе mysqld.

sigurd ★★★★★
()
Ответ на: Содержимое /var/log/mysql/error.log от wirtor

У меня лог запуска очень похож на ваш - отличие только в конце -

[Note] InnoDB: Waiting for purge to start
[Note] InnoDB: 5.7.25 started; log sequence number 133585303232
[Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Server socket created on IP: '::'.
[Note] Reading of all Master_info entries succeded
[Note] Added new Master_info '' to hash table
[Note] /usr/libexec/mysqld: ready for connections.

У вас еще вместо стандартной InnoDB движок Percona XtraDB - читайте на него мануал

sigurd ★★★★★
()
Последнее исправление: sigurd (всего исправлений: 2)
15 августа 2020 г.

Ну бывает

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