'Why mysql 8.0.17 is clean after crash

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


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source