mysql 守护进程_MySQL配额守护进程

1.About

MySQL Quota Daemon is a lightweight tool for limiting database sizes. As the MySQL server has no support for preventing disk from getting filled up, an external one is needed. Other solutions are often bloated or to obscure to use. This one keeps low profile, being both nice to the system it runs on and easy to use. A basic front end for simple management and informing of any quota violation is included.

“MySQL限额守护进程”是一个用来限制数据库大小的轻量级工具。由于MySQL不支持磁盘空间的限制,所以需要外部的工具来实现。

2.How does it work

First, you have to set up quota limits for individual databases. Then, whenever any of these limits is violated, the CREATE and INSERT privileges are taken from that database. It can be also set up to take the UPDATE privilege. When the database has been trimmed to fit the limits, the privileges are automatically GRANTed back.

1.为每个数据库建立配额限制

2.当超过限额,数据库的创建和插入权限将被取消,更新的权

3.保留当数据库被清理到低于限制,权限将被自动恢复

3.Dependencies

The Quota Daemon depends on:

Perl 5 with basic modules, including DBI and DBD::mysql.

MySQL 4 or higher.

Furthermore the front end depends on:

Apache and CGI or compatible.

Perl module. Now aavailable without templating.

The installer assumes it's run on some kind of UN*X system.

这个守护进程依赖于:

Perl5和Perl的一些基本模块,包括DBI和DBD::mysql

MySQL 4或更高版本

前端依赖于:

Apache和CGI或其他相兼容的

Perl模块HTML::Template

4.Installation and configuration

The package comes with an installer. After unpacking it with tar -zxf mysql_quota.tar.gz you should run Perl install.pl and reply all the following questions. Then, assuming you put the front end directly in you root cgi-bin directory, you can administer it by your browser visiting [url]http://yourdomain.com/cgi-bin/mysqlquota.cgi[/url] (of course substitute the domain to whatever it should be).

这个包带有一个安装脚本。用“tar -zxf mysql_quota.tar.gz”解压缩后,运行“Perl install.pl”,然后回复所有提示。假设把前端直接放在cgi-bin目录下,这样就可以通过访问来管理。

The daemon, at runtime, will search for it's configuration file in the path specified at install time and at: ~/.mysqlquotadrc or /etc/mysql_quota. Alternatively you can specify other file as the only parameter. Otherwise it should be started without parameters. Assuming you installed the executable with standard name at /usr/local/bin/ you can add the line:

/usr/local/bin/mysqlquotad to your /etc/rc.d/rc.local file, or whatever it should be under your system. And voila - the daemon starts automatically at boot time.

在运行时,守护进程会在安装时指定的路径中搜索其配置文件,在~/.mysqlquotadrc或/etc/mysql_quota;也可以仅指定其它的文件作为参数;否则它将无参数启动。假设把可执行文件安装在/usr/local/bin,可以添加/usr/local/bin/mysqlquotad到/etc/rc.d/rc.local文件,或诸如此类地它将运行在系统上。这样,守护进程将在启动时自动运行。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值