public function connect(MysqlConnection $connection)
    {
        try {

            // if no connection to master and slave is possible
            if (!$connection->isConnected()) {
                throw new DatabaseException(__METHOD__ . "\nConnection failure no ressource given", self::NO_RESSOURCE, self::SEVERITY_LOG, __FILE__, __LINE__);
            }

            // get the mysql (only master) server details
            if ($this->_get_detail === true) {
                $this->db_detail = $this->getDatabaseDetail($this);
            }

        } catch (DatabaseException $ed) {
            throw $ed;
        }

        if (!$this->db) {
            $this->db = $connection;
        }

        return true;
    }