大网数据广告活动
服务器运维问答

MySQL limiting user disk space by tablespace

· 52CE 我爱测

I am trying to figure out how to set a limit of disk space for users in MySQL. What I want is, for example, administrator assign 1G disk space for user A, if A used up the 1G disk space, MySQL would not allow A insert anything. I…

问题原文

原帖链接 · Firechaser · CC BY-SA 3.0

I am trying to figure out how to set a limit of disk space for users in MySQL. What I want is, for example, administrator assign 1G disk space for user A, if A used up the 1G disk space, MySQL would not allow A insert anything. I googled this problem, and someone mentioned that it can be solved by using tablespace, but did not mention how. Any help is appreciated.

已采纳解答

原帖链接 · HBruijn · CC BY-SA 3.0

As far as I know there is no native MySQL disk quota support (and limiting disk usage for a database with hard quota sounds like a recipe for disaster).

You can report on disk usage though with the MySQL disk usage utility https://dev.mysql.com/doc/mysql-utilities/1.5/en/mysqldiskusage.html

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-01-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。