diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 83702701502eedfd0d07102117465e7ad24d6573..7d2e8fc8c59192a058c09f75bc059bb5d40d7439 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -67,6 +67,8 @@ $conf['db_database'] = '{mysql_server_database}';
 $conf['db_user'] = '{mysql_server_ispconfig_user}';
 $conf['db_password'] = '{mysql_server_ispconfig_password}';
 $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
+$conf['db_new_link'] = false;
+$conf['db_client_flags'] = 0;
 
 define('DB_TYPE',$conf['db_type']);
 define('DB_HOST',$conf['db_host']);
@@ -82,6 +84,8 @@ $conf['dbmaster_host']			= '{mysql_master_server_host}';
 $conf['dbmaster_database']		= '{mysql_master_server_database}';
 $conf['dbmaster_user']			= '{mysql_master_server_ispconfig_user}';
 $conf['dbmaster_password']		= '{mysql_master_server_ispconfig_password}';
+$conf['dbmaster_new_link'] 		= false;
+$conf['dbmaster_client_flags'] 	= 0;
 
 
 //** Paths
diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index 5e38e3b5002b52e0d26eb7f8a03ad3524eac4fd7..fc7b8b313a1ac8d1c75a81bbc87dc49ea15e0988 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -33,6 +33,8 @@ class db {
 	private $dbUser = '';		   // database authorized user
 	private $dbPass = '';		   // user's password
 	private $dbCharset = '';	   // what charset comes and goes to mysql: utf8 / latin1
+	private $dbNewLink = false;    // Return a new linkID when connect is called again
+	private $dbClientFlags = 0;    // MySQL Client falgs
 	private $linkId = 0;		   // last result of mysql_connect()
 	private $queryId = 0;		   // last result of mysql_query()
 	private $record	= array();	   // last record fetched
@@ -51,6 +53,8 @@ class db {
 		$this->dbUser = $conf['db_user'];
 		$this->dbPass = $conf['db_password'];
 		$this->dbCharset = $conf['db_charset'];
+		$this->dbNewLink = $conf['db_new_link'];
+		$this->dbClientFlags = $conf['db_client_flags'];
 		//$this->connect();
 	}
 
@@ -69,7 +73,7 @@ class db {
 	public function connect()
 	{
 		if($this->linkId == 0){
-			$this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
+			$this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbNewLink, $this->dbClientFlags);
 			if(!$this->linkId){
 				$this->updateError('DB::connect()<br />mysql_connect');
 				return false;
diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php
index 0aa84a47eafcdce3a3a33e74b4891db8b89e1021..fc94da8ff1c389a0125fb69b59e65293ca904d1e 100644
--- a/interface/lib/config.inc.php
+++ b/interface/lib/config.inc.php
@@ -54,6 +54,8 @@ $conf['db_database'] = 'ispconfig3';
 $conf['db_user'] = 'root';
 $conf['db_password'] = '';
 $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
+$conf['db_new_link'] = false;
+$conf['db_client_flags'] = 0;
 
 define('DB_TYPE',$conf['db_type']);
 define('DB_HOST',$conf['db_host']);
@@ -69,6 +71,8 @@ $conf['dbmaster_host']			= '{mysql_master_server_host}';
 $conf['dbmaster_database']		= '{mysql_master_server_database}';
 $conf['dbmaster_user']			= '{mysql_master_server_ispconfig_user}';
 $conf['dbmaster_password']		= '{mysql_master_server_ispconfig_password}';
+$conf['dbmaster_new_link'] 		= false;
+$conf['dbmaster_client_flags']  = 0;
 
 
 //** Paths
diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php
index 7e0c5618bfbd888679aa71c8077815fa243ec5a3..3060bab5ce5a9b1668bd52cc27633c71673e3403 100644
--- a/server/lib/classes/db_mysql.inc.php
+++ b/server/lib/classes/db_mysql.inc.php
@@ -34,6 +34,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 		var $dbUser = '';		// database authorized user
 		var $dbPass = '';		// user's password
 		var $dbCharset = 'utf8';// Database charset
+		var $dbNewLink = false; // Return a new linkID when connect is called again
+		var $dbClientFlags = 0; // MySQL Client falgs
 		var $linkId = 0;		// last result of mysql_connect()
 		var $queryId = 0;		// last result of mysql_query()
 		var $record	= array();	// last record fetched
@@ -53,6 +55,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 			$this->dbUser = $conf['db_user'];
 			$this->dbPass = $conf['db_password'];
 			$this->dbCharset = $conf['db_charset'];
+			$this->dbNewLink = $conf['db_new_link'];
+			$this->dbClientFlags = $conf['db_client_flags'];
 			//$this->connect();
 		}
 		
@@ -79,7 +83,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 		{
 			if($this->linkId == 0)
 			{
-				$this->linkId = @mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
+				$this->linkId = @mysql_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbNewLink, $this->dbClientFlags);
 				if(!$this->linkId)
 				{
 					$this->updateError('DB::connect()-> mysql_connect');