Score:0

mysqli::real_connect(): (HY000/2002): No such file or directory

be flag

My MySQL service stopped suddenly.

● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-06-10 10:56:09 UTC; 18min ago
    Process: 1378 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 1386 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 1386 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 13 (Permission denied)

Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: Failed to start MySQL Community Server.
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: Stopped MySQL Community Server.
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: mysql.service: Start request repeated too quickly.
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jun 10 10:56:09 ssdnodes-6033b79bb86b3 systemd[1]: Failed to start MySQL Community Server.
root@ssdnodes-6033b79bb86b3:~#

Error logs show this error:

mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2021-06-10T10:56:09.263519Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 1377
2021-06-10T10:56:09.265942Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-06-10T10:56:09.266149Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.25-0ubuntu0.20.04.1)  (Ubuntu).
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2021-06-10T10:56:09.768183Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 1386
2021-06-10T10:56:09.771054Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-06-10T10:56:09.771264Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.25-0ubuntu0.20.04.1)  (Ubuntu).
in flag
Could you [edit] your question to include a little more context? Has MySQL ever worked on the computer? Have there been any recent changes to the software or configuration? Have you deleted files (because the logs are complaining about missing data)? This will make it more likely that you'll receive a useful answer.
Marc Vanhoomissen avatar
in flag
The logs you posted indicates mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)`. Usually, trying to search interent with this kind of message leads to good results, depending on your specific case.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.