● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-01-21 19:34:13 UTC; 3min 53s ago
Process: 2838586 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 2838594 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 2838594 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 9 (Bad file descriptor)
янв 21 19:34:13 my-new-server systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
янв 21 19:34:13 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
янв 21 19:34:13 my-new-server systemd[1]: Failed to start MySQL Community Server.
янв 21 19:34:13 my-new-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
янв 21 19:34:13 my-new-server systemd[1]: Stopped MySQL Community Server.
янв 21 19:34:13 my-new-server systemd[1]: mysql.service: Start request repeated too quickly.
янв 21 19:34:13 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
янв 21 19:34:13 my-new-server systemd[1]: Failed to start MySQL Community Server.
service mysql stop
killall -KILL mysql mysqld_safe mysqld
service mysql start
2022-01-22T06:08:51.977947Z mysqld_safe Logging to '/var/log/mysqld.log'.
2022-01-22T06:08:51.994220Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2022-01-22T06:08:52.363756Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
root@my-new-server:~# 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.
root@my-new-server:~# journalctl -xe
-- Subject: Ошибка юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита mysql.service.
--
-- Результат: failed.
янв 22 06:11:17 my-new-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
-- Subject: Назначен автоматический перезапуск юнита
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Назначен автоматический перезапуск юнита mysql.service, так как для него был задан
-- параметр Restart=.
янв 22 06:11:17 my-new-server systemd[1]: Stopped MySQL Community Server.
-- Subject: Завершена остановка юнита mysql.service.
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Процесс остановки юнита mysql.service был завершен.
янв 22 06:11:17 my-new-server systemd[1]: Starting MySQL Community Server...
-- Subject: Начинается запуск юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Начат процесс запуска юнита mysql.service.
янв 22 06:11:17 my-new-server audit[2851267]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test" pid=2851267 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
янв 22 06:11:17 my-new-server kernel: audit: type=1400 audit(1642831877.139:6946): apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test" pid=2851267 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/log/mysql/error.log" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/log/mysql/error.log" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/log/mysql/error.log" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/log/mysql/error.log" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/log/mysql/error.log" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server audit[2851268]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/log/mysql/error.log" pid=2851268 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=122 ouid=122
янв 22 06:11:17 my-new-server systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
янв 22 06:11:17 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
янв 22 06:11:17 my-new-server systemd[1]: Failed to start MySQL Community Server.
-- Subject: Ошибка юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита mysql.service.
--
-- Результат: failed.
янв 22 06:11:17 my-new-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 2.
-- Subject: Назначен автоматический перезапуск юнита
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Назначен автоматический перезапуск юнита mysql.service, так как для него был задан
-- параметр Restart=.
янв 22 06:11:17 my-new-server systemd[1]: Stopped MySQL Community Server.
-- Subject: Завершена остановка юнита mysql.service.
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Процесс остановки юнита mysql.service был завершен.
янв 22 06:11:17 my-new-server systemd[1]: Starting MySQL Community Server...
-- Subject: Начинается запуск юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Начат процесс запуска юнита mysql.service.
янв 22 06:11:17 my-new-server audit[2851276]: AVC apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/mnt/vdb1/var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test" pid=2851276 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
--
-- The process' exit code is 'exited' and its exit status is 1.
янв 22 06:35:54 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
янв 22 06:35:54 my-new-server systemd[1]: Failed to start MySQL Community Server.
-- Subject: Ошибка юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита mysql.service.
--
-- Результат: failed.
янв 22 06:35:55 my-new-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Назначен автоматический перезапуск юнита
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Назначен автоматический перезапуск юнита mysql.service, так как для него был задан
-- параметр Restart=.
янв 22 06:35:55 my-new-server systemd[1]: Stopped MySQL Community Server.
-- Subject: Завершена остановка юнита mysql.service.
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Процесс остановки юнита mysql.service был завершен.
янв 22 06:35:55 my-new-server systemd[1]: mysql.service: Start request repeated too quickly.
янв 22 06:35:55 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
янв 22 06:35:55 my-new-server systemd[1]: Failed to start MySQL Community Server.
-- Subject: Ошибка юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита mysql.service.
--
-- Результат: failed.
lines 1852-1895/1895 (END)
--
-- The process' exit code is 'exited' and its exit status is 1.
янв 22 06:35:54 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
янв 22 06:35:54 my-new-server systemd[1]: Failed to start MySQL Community Server.
-- Subject: Ошибка юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита mysql.service.
--
-- Результат: failed.
янв 22 06:35:55 my-new-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Назначен автоматический перезапуск юнита
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Назначен автоматический перезапуск юнита mysql.service, так как для него был задан
-- параметр Restart=.
янв 22 06:35:55 my-new-server systemd[1]: Stopped MySQL Community Server.
-- Subject: Завершена остановка юнита mysql.service.
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Процесс остановки юнита mysql.service был завершен.
янв 22 06:35:55 my-new-server systemd[1]: mysql.service: Start request repeated too quickly.
янв 22 06:35:55 my-new-server systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
янв 22 06:35:55 my-new-server systemd[1]: Failed to start MySQL Community Server.
-- Subject: Ошибка юнита mysql.service
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Произошел сбой юнита mysql.service.
--
-- Результат: failed.
sudo vi /etc/apparmor.d/usr.sbin.mysqld
...
/etc/mysql/mysql.conf.d/ r,
/etc/mysql/mysql.conf.d/* r,
/sys/devices/system/node/* r,
/etc/mysql/*.cnf r,
/run/mysqld/* rw,
...
$ sudo systemctl reload apparmor.service
$ sudo systemctl start mysql.service
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start) since Tue 2022-01-25 21:23:54 UTC; 1s ago
Process: 877834 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 877842 (mysqld)
Status: "Server startup in progress"
Tasks: 18 (limit: 2274)
Memory: 328.5M
CGroup: /system.slice/mysql.service
└─877842 /usr/sbin/mysqld
янв 25 21:23:54 my-new-server systemd[1]: Starting MySQL Community Server...
2022-01-26T06:01:32.706985Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 889371
2022-01-26T06:01:32.721085Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-01-26T06:01:33.742259Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-01-26T06:01:34.227256Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2022-01-26T06:01:34.227337Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2022-01-26T06:01:34.229526Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-01-26T06:01:34.229632Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-01-26T06:01:34.248343Z 0 [ERROR] [MY-000067] [Server] unknown variable 'old_passwords=1'.
2022-01-26T06:01:34.249059Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-01-26T06:01:35.580251Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.27-0ubuntu0.20.04.1) (Ubuntu).
2022-01-26T06:01:36.293231Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 889418
2022-01-26T06:01:36.307734Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-01-26T06:01:37.169346Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-01-26T06:01:37.505961Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2022-01-26T06:01:37.506907Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2022-01-26T06:01:37.509403Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-01-26T06:01:37.509515Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-01-26T06:01:37.535267Z 0 [ERROR] [MY-000067] [Server] unknown variable 'old_passwords=1'.
2022-01-26T06:01:37.536082Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-01-26T06:01:38.905887Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.27-0ubuntu0.20.04.1) (Ubuntu).
2022-01-26T06:01:39.757345Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-0ubuntu0.20.04.1) starting as process 889464
2022-01-26T06:01:39.768995Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-01-26T06:01:40.491621Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-01-26T06:01:41.045483Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2022-01-26T06:01:41.045520Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2022-01-26T06:01:41.046367Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-01-26T06:01:41.046403Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-01-26T06:01:41.058650Z 0 [ERROR] [MY-000067] [Server] unknown variable 'old_passwords=1'.
2022-01-26T06:01:41.058993Z 0 [ERROR] [MY-010119] [Server] Aborting
unknown variable 'old_passwords=1'.
2022-01-28T06:51:17.503789Z mysqld_safe Logging to '/var/log/mysqld.log'.
2022-01-28T06:51:17.520136Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2022-01-28T06:51:17.932275Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld