1
我测试了下面的PDO代码,我可以通过show processlist
查看MySQL中与MySQL的连接,但我怎样才能切断一个连接?除了命令行之外,还有其他管理MySQL连接/等的强大工具吗?如何管理MySQL内的MySQL连接?
<?php
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(PDO::ATTR_PERSISTENT => true));
// use the connection here
// and now we're done; close it
$dbh = null;
?>