有没有办法读取最大值。 PHP中的MySQL数据库容量?如何获得最大mySQL数据库容量在PHP?
我已经做了一个类,以确保数据库从gettin溢出。它工作得很好,唯一的问题是我不能得到最大数据库大小(每个数据库)。我必须像这样手动设置它:
class StorageSecurity
{
private static $MAX_DB_SIZE = 100; //MB
private $_db_host; //Database Host
private $_db_user; //Database Username
private $_db_pass; //Database Userpass
public function __construct(Database $_db)
{
try
{
$this->_errors = Array();
$this->_db_host = $_db->getDBHost();
$this->_db_user = $_db->getDBUser();
$this->_db_pass = $_db->getDBPass();
$this->setMaxDBCapacity(self::$MAX_DB_SIZE);
$db_conn = mysql_pconnect($this->_db_host, $this->_db_user,
$this->_db_pass);
if (!$db_conn) throw new Exception("Server Connection Failed.");
} catch(Exception $e) {
$this->_errors[] = $e->getMessage();
}
}
}
谢谢!
没有答案.... – Racooon 2011-05-20 22:36:42
你是什么意思的最大容量多少?它是否包含日志文件的大小(对于InnoDB)?它是基于磁盘上剩余的空间量吗? – 2011-05-20 22:39:50
最大分贝大小,我认为,没有其他说明。 – Racooon 2011-05-20 22:56:46