public function checkDatabasePermission($conn, $database, $permission)
    {
        $grants = $this->column($conn->query("SHOW GRANTS FOR CURRENT_USER"));
        foreach ($grants as $grant) {
            if ($this->checkDatabasePermissionGrant($database, $permission, $grant)) {
                return true;
            }
        }
        return false;
    }