После выполнения инструкций в этом сообщении о том, как установить MySQL 5.6 поверх существующей установки 5.7 на Ubuntu 16.04, я имел несколько проблем с запуском службы.
Сначала это произошло:
Что было решено, запустив systemctl unmask mysql.service . Однако затем я неоднократно получал это сообщение:
Проверка systemctl status mysql.service показала:
2 ответа
Исправление для этого содержало несколько этапов, включая различные журналы отладки, а затем следующие подсказки в этих журналах. Я документирую их, чтобы помогать другим — ваши проблемы могут быть разными, но этот процесс должен помочь обнаружить, что не так:
Во-первых, journalctl -xe содержит намного больше информации. В моем случае он содержал:
Это можно исправить с помощью vi /etc/apparmor.d/usr.sbin.mysqld и добавления строк для:
Интересным моментом является то, что ему нужна отдельная строка для каталога и файлов подстановочных знаков внутри него — это может быть распространено для некоторых приложений unix, но не для всех, поэтому может вас пошевелить.
После того, как все изменения apparmor были выполнены, система все равно не запустилась, и на этот раз команда journalctl -xe ничего не принесла.
Затем я смог запустить sudo -u mysql mysqld , чтобы попытаться запустить демон вручную. Это показало неудачу при запуске InnoDB, но не почему.
По прихоти я удалил файлы /var/lib/mysql/ib_logfile* и ib_binlog и попробовал еще раз; на этот раз сервер запустился. Затем я смог завершить это и запустить service start mysql , который работал.
Отдельно я удалил /var/lib/mysql/debian-5.7.flag — я не уверен, что это помогло или вызвало бы последующие проблемы, если бы я этого не сделал.
Надеюсь, этот пример помогает кому-то; не стесняйтесь добавлять другие ответы вдоль подобной строки, если вы столкнулись с различными проблемами с этим процессом.
So this happened after a reboot
2 Answers 2
Well for some reason mysqld_safe is missing. No idea where it went.
I simply apt-get remove —> install —> mysql_secure_installation and problem is gone.
To check for details about the error, run:
For more details about the error, check logs:
To initialize the MySQL configuration, run:
Not the answer you’re looking for? Browse other questions tagged mariadb or ask your own question.
Related
Hot Network Questions
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2019 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2019.11.15.35459
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto | Site FAQ | Sitemap | Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
| Introduction to Linux — A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author’s experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. |
| 02-10-2017, 10:32 PM | #1 |