LINUX.ORG.RU
Ответ на: комментарий от goingUp
~# systemctl status mysql.service
mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
     Active: activating (start) since Fri 2023-03-10 19:40:39 UTC; 14s ago
    Process: 65885 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=>
   Main PID: 65893 (mysqld)
     Status: "Server startup in progress"
      Tasks: 13 (limit: 9263)
     Memory: 254.9M
        CPU: 454ms
     CGroup: /system.slice/mysql.service
             └─65893 /usr/sbin/mysqld


~# journalctl -xeu mysql.service
Mar 10 19:40:39 vps-ad2a411e systemd[1]: mysql.service: Scheduled restart job, >
░░ 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 re>
░░ the configured Restart= setting for the unit.
Mar 10 19:40:39 vps-ad2a411e systemd[1]: Stopped MySQL Community Server.
░░ Subject: A stop job for unit mysql.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit mysql.service has finished.
░░
░░ The job identifier is 12696 and the job result is done.
Mar 10 19:40:39 vps-ad2a411e systemd[1]: Starting MySQL Community Server...
░░ Subject: A start job for unit mysql.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit mysql.service has begun execution.
░░
░░ The job identifier is 12696.
sergmar
() автор топика
Ответ на: комментарий от goingUp
2023-03-10T17:46:42.468414Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) initializing of server in progress as process 49524
2023-03-10T17:46:42.476793Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-03-10T17:46:42.799269Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-03-10T17:46:45.728425Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2023-03-10T17:46:47.158006Z 6 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.32-0ubuntu0.22.04.2).
2023-03-10T17:46:53.281544Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) starting as process 49572
2023-03-10T17:46:53.320129Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-03-10T17:46:54.405634Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-03-10T17:46:55.324352Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-03-10T17:46:55.324422Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-03-10T17:46:55.333616Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different>
2023-03-10T17:46:55.364653Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2023-03-10T17:46:55.364744Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32-0ubuntu0.22.04.2'  socket: '/tmp/tmp.l9nVA78umq/mysqld.sock'  port: 0 >
2023-03-10T17:46:55.406573Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.32-0ubuntu0.22.04.2).
2023-03-10T17:46:56.812934Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32-0ubuntu0.22.04.2)  (Ubuntu).
2023-03-10T17:46:57.879435Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) starting as process 49645
2023-03-10T17:46:57.891045Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-03-10T17:46:58.036309Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-03-10T17:46:58.286112Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-03-10T17:46:58.286174Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-03-10T17:46:58.292943Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different>
2023-03-10T17:46:58.325522Z 7 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.32-0ubuntu0.22.04.2).
2023-03-10T17:46:58.331012Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-03-10T17:46:59.892933Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32-0ubuntu0.22.04.2)  (Ubuntu).
2023-03-10T17:47:01.388548Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) starting as process 49785
2023-03-10T17:47:01.398924Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-03-10T17:47:01.631829Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-03-10T17:47:01.990937Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-03-10T17:47:01.990992Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-03-10T17:47:02.029474Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-03-10T17:47:02.029651Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32-0ubuntu0.22.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  >
2023-03-10T18:27:46.969190Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.32-0ubuntu0.22.04.2).
2023-03-10T18:27:48.971857Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 10  user: 'root'.
2023-03-10T18:27:48.974149Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 13  user: 'root'.
2023-03-10T18:27:49.815070Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32-0ubuntu0.22.04.2)  (Ubuntu).
2023-03-10T18:28:03.963087Z 0 [Warning] [MY-010143] [Server] Ignoring user change to 'root' because the user was set to 'mysql' earlier on the command line
2023-03-10T18:28:03.966992Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-0ubuntu0.22.04.2) starting as process 61673
2023-03-10T18:28:03.979047Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-03-10T18:28:04.193102Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-03-10T18:28:04.386252Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2023-03-10T18:28:04.386322Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.soc>
2023-03-10T18:28:04.531089Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-03-10T18:28:04.531145Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-03-10T18:28:04.538168Z 0 [ERROR] [MY-010273] [Server] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2023-03-10T18:28:04.538230Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
sergmar
() автор топика
Ответ на: комментарий от ya-betmen
~# tail /var/log/mysql/error.log
2023-03-10T20:57:01.193444Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:02.193708Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:03.194064Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:04.194449Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:05.194755Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:06.195007Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:07.195212Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:08.195455Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:09.195811Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
2023-03-10T20:57:10.196118Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibda                                                                                                             ta1 error: 11
sergmar
() автор топика
Ответ на: комментарий от ya-betmen
~# ps ax | grep -i mysql
  68217 ?        Ssl    0:01 /usr/sbin/mysqld
  68270 pts/0    S+     0:00 grep --color=auto -i mysql

Частино разобрался. Убил все процессы связанные с mysql, и mysql запустился. Но теперь проблему в том что не могу запустить ~# mysql.

~# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO.)

С чем это связанно? Пароль для root при установке mysql я присвоил.

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

И что, пароль не подходит? Ну сбрось его.

Интересно зачем ты его ставил, в убунте вроде по умолчанию через auth socket работает.

easybreezy
()
Последнее исправление: easybreezy (всего исправлений: 1)
Ответ на: комментарий от easybreezy

Отличная медвежья услуга. Теперь точно не запустится, так как все пермишены и овнеры файлов хрен знает какие.

Не делай так больше.

adn ★★★★
()
Последнее исправление: adn (всего исправлений: 1)
Ответ на: комментарий от adn

Сделает chown, какие проблемы. Но я сильно сомневаюсь, что «все пермишены и овнеры файлов хрен знает какие.».

upd: вообще я конечно ошибся. Но проверил на 20.04, пермишны не меняются, mysqld просто не запустится. Запустится, если сервис уже работает и сокет существует (точнее, /var/run/mysqld).

В любом случае совет вредный, ты прав.

easybreezy
()
Последнее исправление: easybreezy (всего исправлений: 3)
Ответ на: комментарий от easybreezy

После сборса пароля mysql запустился корректно. Про какие пермишны вы говорите? Нужно ли теперь что то еще делать для корреткной рабоыти и безопасности сервера?

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