S
S
SergeyFrolenko2018-05-28 11:26:34
linux
SergeyFrolenko, 2018-05-28 11:26:34

How to fix error in MySQL installation on Linux Ubuntu?

First when installing
sudo apt install mysql-server-5.7

Issues
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1


Translated as "mysql-server-5.7" installed after error in subprocess Trying
to run
/etc/init.d/mysql start
Issues
[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
 failed!


I read
systemctl status mysql.service
Issues
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
   Active: activating (start-pre) since Mon 2018-05-28 13:09:43 +05; 58ms ago
  Process: 19118 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Cntrl PID: 19152 (mysql-systemd-s)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/mysql.service
           ├─19152 /bin/bash /usr/share/mysql/mysql-systemd-start pre
           ├─19158 /bin/bash /usr/share/mysql/mysql-systemd-start pre
           └─19159 mysqld --verbose --help --innodb-read-only

мая 28 13:09:43 serg-Aspire-V5-552G systemd[1]: Starting MySQL Community Server...


I read
journalctl -xe
Issues
мая 28 13:12:46 serg-Aspire-V5-552G systemd[1]: mysql.service: Failed with result 'exit-code'.
мая 28 13:12:46 serg-Aspire-V5-552G systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has failed.
-- 
-- The result is RESULT.
мая 28 13:12:46 serg-Aspire-V5-552G systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
мая 28 13:12:46 serg-Aspire-V5-552G systemd[1]: mysql.service: Scheduled restart job, restart counter is at 80.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
мая 28 13:12:46 serg-Aspire-V5-552G systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has finished shutting down.
мая 28 13:12:46 serg-Aspire-V5-552G systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has begun starting up.
мая 28 13:12:46 serg-Aspire-V5-552G audit[22020]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/
мая 28 13:12:46 serg-Aspire-V5-552G kernel: audit: type=1400 audit(1527495166.595:1366): apparmor="DENIED" operation="open" profile="/usr/sbin
мая 28 13:12:46 serg-Aspire-V5-552G audit[22022]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/
мая 28 13:12:46 serg-Aspire-V5-552G kernel: audit: type=1400 audit(1527495166.647:1367): apparmor="DENIED" operation="open" profile="/usr/sbin
мая 28 13:12:47 serg-Aspire-V5-552G mysqld[22022]: Initialization of mysqld failed: 0
мая 28 13:12:47 serg-Aspire-V5-552G systemd[1]: mysql.service: Control process exited, code=exited status=1


After trying to reinstall according to these instructions
https://askubuntu.com/questions/789853/unable-to-i... the
situation has not changed
. For three days I can not raise mysql on the local...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2018-05-28
@notwrite

apparmor customize

C
CityCat4, 2018-05-28
@CityCat4

Translated as "mysql-server-5.7" installed after subprocess error

Wrong.
"An error occurred while executing the post-installation script subprocess, return code 1" (or literally "the post-installation script subprocess returned an error, exit code 1"). That is, the package itself was installed, but the configuration is not completed. Why is it not finished - but KhBZ. In normal systems, they look at the logs. Where SSZB use systemd - well ... they also look ... probably ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question