what is Mysql datadir purpose?

114 Views Asked by At

I sometimes get connection refused or connection lost errors from our mysql server. I noticed it is due to partition allocated to datadir is 100% full with 5kb of free space. So no request should pass, is it? Why are some queries running correctly and others not? Does Mysql use the space available in datadir partition during a SELECT for example?

Thank you for helping me clarify that.

1

There are 1 best solutions below

2
Álvaro González On

You can find datadir definition among System Variables:

The MySQL data directory

... and the current value of this and other directories with this query:

SHOW VARIABLES LIKE '%dir%'

datadir is just what the name implies, the place where MySQL physically stores its databases.

What works and what doesn't then data directory runs out of space is something you probably won't find documented since it isn't a scenario MySQL is designed for.