LINUX.ORG.RU

Ошибка при запуск служба Mysql

 , ,


0

2

Добрый день уважаемые программисты. Устанавливал Apache+php+Mysql чистом Ubuntu-16.04-amd64. Apache запускалось нормально без никаких проблем. Но при запуск служб mysql:

 service mysql start
выводиться ошибка:
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
А systemctl status mysql.service выводить это:
root@mubin:~# systemctl status mysql.service
* mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en
   Active: activating (start-post) (Result: exit-code) since Tue 2019-01-15 18:4
  Process: 9345 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 9337 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exit
 Main PID: 9345 (code=exited, status=1/FAILURE);         : 9346 (mysql-systemd-s
   CGroup: /system.slice/mysql.service
           `-control
             |-9346 /bin/bash /usr/share/mysql/mysql-systemd-start post
             `-9393 sleep 1

Jan 15 18:43:56 mubin systemd[1]: Starting MySQL Community Server...
Jan 15 18:43:56 mubin systemd[1]: mysql.service: Main process exited, code=exite
А journalctl -xe вот это:
root@mubin:~# journalctl -xe
-- Unit mysql.service has failed.
--
-- The result is failed.
Jan 15 18:45:27 mubin systemd[1]: mysql.service: Unit entered failed state.
Jan 15 18:45:27 mubin systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 15 18:45:27 mubin systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Jan 15 18:45:27 mubin systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Jan 15 18:45:27 mubin systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jan 15 18:45:28 mubin systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Jan 15 18:45:57 mubin systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Jan 15 18:45:57 mubin systemd[1]: mysql.service: Unit entered failed state.
Jan 15 18:45:57 mubin systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 15 18:45:58 mubin systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Jan 15 18:45:58 mubin systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Jan 15 18:45:58 mubin systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jan 15 18:45:58 mubin systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
А в логах /var/log/mysql/error.log вот эти:
2019-01-15T15:30:43.605906Z 0 [Note] Binlog end
2019-01-15T15:30:43.606023Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:30:43.606520Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-01-15T15:31:13.785266Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-01-15T15:31:13.785403Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-01-15T15:31:14.060967Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T15:31:14.066311Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 7297 ...
2019-01-15T15:31:14.078356Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-01-15T15:31:14.078412Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-15T15:31:14.078439Z 0 [Note] InnoDB: Uses event mutexes
2019-01-15T15:31:14.078455Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-01-15T15:31:14.078468Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-01-15T15:31:14.078481Z 0 [Note] InnoDB: Using Linux native AIO
2019-01-15T15:31:14.079651Z 0 [Note] InnoDB: Number of pools: 1
2019-01-15T15:31:14.080118Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-01-15T15:31:14.085425Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-01-15T15:31:14.085524Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-01-15T15:31:14.085553Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-15T15:31:14.085575Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-15T15:31:14.085598Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-15T15:31:14.085611Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-15T15:31:14.085627Z 0 [ERROR] Failed to initialize builtin plugins.
2019-01-15T15:31:14.085638Z 0 [ERROR] Aborting

2019-01-15T15:31:14.085667Z 0 [Note] Binlog end
2019-01-15T15:31:14.085780Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:31:14.086154Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-01-15T15:31:44.272469Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-01-15T15:31:44.272600Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-01-15T15:31:44.566308Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T15:31:44.572794Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 7374 ...
2019-01-15T15:31:44.585293Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-01-15T15:31:44.585346Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-15T15:31:44.585361Z 0 [Note] InnoDB: Uses event mutexes
2019-01-15T15:31:44.585374Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-01-15T15:31:44.585386Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-01-15T15:31:44.585399Z 0 [Note] InnoDB: Using Linux native AIO
2019-01-15T15:31:44.586334Z 0 [Note] InnoDB: Number of pools: 1
2019-01-15T15:31:44.586758Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-01-15T15:31:44.592895Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-01-15T15:31:44.593040Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-01-15T15:31:44.593477Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-15T15:31:44.593503Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-15T15:31:44.593527Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-15T15:31:44.593563Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-15T15:31:44.593580Z 0 [ERROR] Failed to initialize builtin plugins.
2019-01-15T15:31:44.593591Z 0 [ERROR] Aborting

2019-01-15T15:31:44.593621Z 0 [Note] Binlog end
2019-01-15T15:31:44.593741Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:31:44.594166Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-01-15T15:32:14.768091Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-01-15T15:32:14.768219Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-01-15T15:32:15.050526Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T15:32:15.060616Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 7473 ...
2019-01-15T15:32:15.073790Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-01-15T15:32:15.073862Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-15T15:32:15.073881Z 0 [Note] InnoDB: Uses event mutexes
2019-01-15T15:32:15.073895Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-01-15T15:32:15.073908Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-01-15T15:32:15.073921Z 0 [Note] InnoDB: Using Linux native AIO
2019-01-15T15:32:15.074809Z 0 [Note] InnoDB: Number of pools: 1
2019-01-15T15:32:15.075206Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-01-15T15:32:15.081385Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-01-15T15:32:15.081491Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-01-15T15:32:15.081524Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-15T15:32:15.081548Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-15T15:32:15.081576Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-15T15:32:15.081589Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-15T15:32:15.081606Z 0 [ERROR] Failed to initialize builtin plugins.
2019-01-15T15:32:15.081618Z 0 [ERROR] Aborting

2019-01-15T15:32:15.081650Z 0 [Note] Binlog end
2019-01-15T15:32:15.081763Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:32:15.082167Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-01-15T15:32:45.287641Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-01-15T15:32:45.287870Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-01-15T15:32:45.546617Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T15:32:45.552002Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 7549 ...
2019-01-15T15:32:45.566949Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-01-15T15:32:45.567012Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-15T15:32:45.567025Z 0 [Note] InnoDB: Uses event mutexes
2019-01-15T15:32:45.567037Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-01-15T15:32:45.567048Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-01-15T15:32:45.567061Z 0 [Note] InnoDB: Using Linux native AIO
2019-01-15T15:32:45.567972Z 0 [Note] InnoDB: Number of pools: 1
2019-01-15T15:32:45.568357Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-01-15T15:32:45.573451Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-01-15T15:32:45.573546Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-01-15T15:32:45.573574Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-15T15:32:45.573594Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-15T15:32:45.573615Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-15T15:32:45.573627Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-15T15:32:45.573677Z 0 [ERROR] Failed to initialize builtin plugins.
2019-01-15T15:32:45.573692Z 0 [ERROR] Aborting

2019-01-15T15:32:45.573720Z 0 [Note] Binlog end
2019-01-15T15:32:45.573847Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:32:45.574250Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-01-15T15:33:15.772878Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-01-15T15:33:15.773007Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-01-15T15:33:16.057878Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T15:33:16.063971Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 7628 ...
2019-01-15T15:33:16.076741Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-01-15T15:33:16.076812Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-15T15:33:16.076857Z 0 [Note] InnoDB: Uses event mutexes
2019-01-15T15:33:16.076885Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-01-15T15:33:16.076909Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-01-15T15:33:16.076936Z 0 [Note] InnoDB: Using Linux native AIO
2019-01-15T15:33:16.077988Z 0 [Note] InnoDB: Number of pools: 1
2019-01-15T15:33:16.078444Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-01-15T15:33:16.084782Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-01-15T15:33:16.084894Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-01-15T15:33:16.084924Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-15T15:33:16.084946Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-15T15:33:16.084972Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-15T15:33:16.084985Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-15T15:33:16.085002Z 0 [ERROR] Failed to initialize builtin plugins.
2019-01-15T15:33:16.085014Z 0 [ERROR] Aborting

2019-01-15T15:33:16.085046Z 0 [Note] Binlog end
2019-01-15T15:33:16.085177Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:33:16.085581Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-01-15T15:33:46.273370Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2019-01-15T15:33:46.273511Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2019-01-15T15:33:46.568961Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T15:33:46.574408Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.24-0ubuntu0.16.04.1) starting as process 7727 ...
2019-01-15T15:33:46.586364Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-01-15T15:33:46.586412Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-15T15:33:46.586425Z 0 [Note] InnoDB: Uses event mutexes
2019-01-15T15:33:46.586436Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-01-15T15:33:46.586447Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-01-15T15:33:46.586458Z 0 [Note] InnoDB: Using Linux native AIO
2019-01-15T15:33:46.587267Z 0 [Note] InnoDB: Number of pools: 1
2019-01-15T15:33:46.587602Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-01-15T15:33:46.595156Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-01-15T15:33:46.595253Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-01-15T15:33:46.595338Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-15T15:33:46.595361Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-15T15:33:46.595383Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-15T15:33:46.595395Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-15T15:33:46.595409Z 0 [ERROR] Failed to initialize builtin plugins.
2019-01-15T15:33:46.595448Z 0 [ERROR] Aborting

2019-01-15T15:33:46.595478Z 0 [Note] Binlog end
2019-01-15T15:33:46.595589Z 0 [Note] Shutting down plugin 'CSV'
2019-01-15T15:33:46.595976Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

Оформите используя LORCODE www.linux.org.ru/help/lorcode.md (подсказка: используйте тег [code] выхлоп [/code])

Для длинных «портянок» используйте https://pastebin.com или аналогичный сервис, сюда прилагайте ссылку.

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

Он же пишет что ему не хватает памяти

У меня VDS: Дисковое пространство: 5 GB Процессор: 700 MHz Оперативная память: 256 Mb

Что посоветуйте. Значить не получается работать с этим сервером?

mubin1989 ()
Ответ на: Он же пишет что ему не хватает памяти от mubin1989

Все зависит от Ваших задач.
Если конечное приложение совсем не ресурсоемкое и большого потока клиентов не ожидается, то попробовать можно. Но нужно будет очень хорошо покрутить настройки у всего что есть в системе.
Вообще 256Мб RAM для одновременной работы apache и mysql выглядит странным решением..

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

Если есть возможность, то да, лучше голову не ломать и сразу RAM увеличить.

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