#### Mysql2::Error: Out of sort memory, consider increasing server sort buffer size using docker-compose.yml

Hi I’m building a rails app and I imported lots of data and inserted into the database. Some tables are okay and some tables have some errors that says out of sort memory.

SQL ERROR

Mysql2::Error: Out of sort memory, consider increasing server sort buffer size


How do you increase server sort buffer size using the docker-compose.yml command?

I’ve tried this one:

version: '3'
services:
db:
image: mysql:latest
command:
- --innodb-buffer-pool-size=402653184


--innodb-buffer-pool-size=402653184

but I’m still getting the same error that it is out of memory. Is there any way to increase the buffer size using the docker-compose.yml