0

I was working with my website and after I started a very huge process in the server (CentOS 8.5.2111), the server can not allocate more tasks because memory full, and MySQL (8.0.17) started with errors. 3 hours later MySQL crashed and stooped and started trying to start but it was no possible and many hours later MySQL started after many times trying to start but now is a clean MySQL installation with no users and no databases the MySQL folder is empty and there is no databases files, I was looking in logs but there is nothing, just the below log message. I need to restore InnoDB databases but there is nothing.

2022-03-28T16:19:58.870481Z 0 [System] [MY-013169] [Server] /usr/libexec/mysqld (mysqld 8.0.17) initializing of server in progress as process 16850
2022-03-28T16:20:13.468199Z 0 [ERROR] [MY-012681] [InnoDB] mmap(137363456 bytes) failed; errno 12
2022-03-28T16:20:13.919383Z 1 [ERROR] [MY-012956] [InnoDB] Cannot allocate memory for the buffer pool
2022-03-28T16:20:14.152912Z 1 [ERROR] [MY-012929] [InnoDB] InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2022-03-28T16:20:15.079705Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-03-28T16:20:15.276524Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2022-03-28T16:20:16.715770Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-03-28T16:20:17.933992Z 0 [System] [MY-010910] [Server] /usr/libexec/mysqld: Shutdown complete (mysqld 8.0.17)  Source distribution.

2022-03-28T16:20:42.289669Z 0 [System] [MY-013169] [Server] /usr/libexec/mysqld (mysqld 8.0.17) initializing of server in progress as process 16947
2022-03-28T16:21:12.300451Z 5 [Warning] [MY-010453] [Server] **root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.**
2022-03-28T16:21:14.205316Z 0 [System] [MY-013170] [Server] /usr/libexec/mysqld (mysqld 8.0.17) initializing of server has completed
2022-03-28T16:21:38.677488Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.0.17) starting as process 1400
2022-03-28T16:21:42.249358Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-03-28T16:21:42.373108Z 0 [System] [MY-010931] [Server] /usr/libexec/mysqld: ready for connections. Version: '8.0.17'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution.
2022-03-28T16:21:42.508207Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/lib/mysql/mysqlx.sock' bind-address: '::' port: 33060
terminate called after throwing an instance of 'std::system_error'
  what():  Resource temporarily unavailable
4
  • It sounds like you had overallocated memory on your server, probably you set innodb_buffer_pool_size much too high. So mysqld couldn't acquire that amount of RAM, and couldn't start. But I've never seen that result in MySQL erasing its own datadir. I think something else happened, like filesystem corruption, or else maybe you had tried to put the datadir on a RAMdisk or cloud instance storage which vanished after a reboot. I'm only guessing. Apr 27 at 18:24
  • Anyway, given that you say the datadir is completely empty, I think now you get to restore from the most recent backup. If you don't have a backup, you get to start over. Sorry. Apr 27 at 18:25
  • What is filling up memory? It's not MySQL; the buffer_pool is asking for a trivial 128MB, which is dangerously low. How much RAM? Is swap space set up? A RAMdisk would only make things worse -- by taking away RAM!
    – Rick James
    Apr 28 at 15:22
  • Indeed, 128MB is small, I did not notice that. So I guess something else is running on the same host that is consuming all the RAM. Apr 29 at 16:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy