MySQL schema size

I only have a MySQL server (InnoDB only) with multiple users. Each user has access to one exclusive scheme. How can I limit the size of the circuit so that each user can use only 1 GB (for example)?

+1
source share
1 answer

MySQL itself does not offer a quota system. Using the method proposed by James McNellis is likely to work, however, if InnoDB reaches a hard quota limit, it certainly will not bring stability; all data files are still connected through the system tablespace, which is impossible to get rid of.

Unfortunately, I do not see a practical way to achieve the desired. If you are worried that disk space usage exceeds predefined limits and does not want to follow the path of external quota rules, I suggest that you stay with the combined table space settings (i.e. No innodb_file_per_table ) and remove :autoextend from the configuration.

Thus, you will still not receive restrictions on specific users or schemes, but at least prevent the disk from filling up with data, since the table space in this setting will not exceed its initial size. With innodb_file_per_table , unfortunately, there is no way to configure each of them to stop with a certain maximum size.

This is one aspect that MySQL differs from other, supposedly more enterprise databases. Do not get me wrong, although we use InnoDB with a lot of data in several thousand installations, so it certainly proved its readiness for production. Only control functions a little from time to time.

+2
source

All Articles