1

I've installed mysql, it works well, but sometimes I have: Aborted connection 114069 to db: 'db1' user: 'root' host: 'localhost' (Got an error reading communication packets) I've tried to solve it:sudo mysqld --max_allowed_packet=128M but after it mysql doesn't work at all

2019-04-08T18:42:11.047491Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-04-08T18:42:11.047520Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-04-08T18:42:11.047530Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-04-08T18:42:11.047534Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-04-08T18:42:11.047539Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-04-08T18:42:11.047555Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-04-08T18:42:11.047559Z 0 [ERROR] Failed to initialize builtin plugins.
2019-04-08T18:42:11.047562Z 0 [ERROR] Aborting

I don't know to which file mysql wrote this confit to remove it. How can I solve it or rollback?

newbie
  • 11
  • 3
  • `[ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12` the database is trying to lock ~137MB of RAM, but is failing to do so. Check what you have running that is stealing all your memory, and try to free some up. – Matt Clark Apr 08 '19 at 19:00
  • how can I do this? – newbie Apr 08 '19 at 19:02
  • 1
    Windows? Use task manager. Linux? Use a command like `ps aux` to see which process has reserved how much memory. If you are actually asking how to free up RAM on your system, that is well beyond the scope of this question. Answer to this question is you don't have enough RAM free. – Matt Clark Apr 08 '19 at 19:04
  • Also see https://stackoverflow.com/questions/25965638/mysql-fatal-error-cannot-allocate-memory-for-the-buffer-pool or any of the many other times this error has been posted to Stack Overflow. – Bill Karwin Apr 08 '19 at 19:06
  • Linux. Thx, the reason is clear, can I rollback it to work with such amount fo memory or can I only free ram& – newbie Apr 08 '19 at 19:06
  • The problem is not the configuration of MySQL. The problem is that you have so many other processes consuming RAM on your server, that you're all out of available RAM. It shouldn't be difficult for MySQL to find 128MB free, because this is a small amount of memory on most modern systems. You need to manage the other apps and processes, or else move this operation to a server with greater RAM. – Bill Karwin Apr 08 '19 at 19:08

0 Answers0