I'm getting the following error when trying to query a large amount of data from my home project database:
Error Code: 1114. The table '/var/tmp/#sql73_198dd_af' is full
The query is pulling nearly all the data from 5-6 tables that have a combined on disk size of about 3Gb.
I gather from reading around that I need to amend the my.cnf
file to increase the size of my temporary tables. I'm a little uncertain as to what configuration I need to add as I'm a long way away from being an expert on mysql. The my.cnf
file was pretty sparse to begin with but with a couple of additional lines it now looks like this:
# Default Homebrew MySQL server config
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
tmp_table_size = 12G
innodb_buffer_pool_size = 12G
max_heap_table_size = 12G
I've also specified the location of the config file in System Preferences:
However, after restarting mysql and restarting my machine I'm still getting the same error when I try to run the query. Additionally, when I go to Server
> Options File
in Workbench I get a screen that says Location of MySQL configuration file (ie: my.cnf) not specified
. Furthermore the Find
text entry box, where I think I should be able to find and set the location, is greyed out.
It would appear I have an issue with mysql not reading my config file - could anyone point me in the right direction?
I'm also aware that I may not be adding the right settings to the config file. This should probably be the subject of another post but any tips would be greatly appreciated :)
Last, how would I find out what settings my current instance of mysql is using? I've tried running SELECT @innodb_buffer_pool_size
from Workbench but I get a null result. I'm not sure if I'm not running the right command or it actually is null (unlikely!).
I'm running mysql 8.0.26 on a MacBook Pro with Big Sur 11.6 and 16G of RAM.
Thanks in advance.
Update:
I've now worked out how to point Workbench at the my.cnf
file. You can do this via Database
> Manage Connections...
> System Profile
> Configuration File:
. However, I can't actually find any of the settings like innodb_buffer_pool_size
! The query also still doesn't run after a restart of mysql.
Now I reckon one or more of the following things could be happening:
- I haven't added enough to the config file to fix the temp table issue
- My
12G
settings aren't enough to run the query - mysql still isn't reading the config file
Could someone provide me with any pointers?