Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 11216)
+++ wp-includes/wp-db.php	(working copy)
@@ -369,6 +369,9 @@
 			}
 		}
 
+		if (WP_INSTALLING) 
+			$this->_fuzzy_createdb($dbname);
+
 		$this->select($dbname);
 	}
 
@@ -414,6 +417,33 @@
 		return $old_prefix;
 	}
 
+	/** create a database only if it seems to be needed
+	 * 
+	 * Creates a database using the current database connection in case
+	 * it is not currently select-able.
+	 * 
+	 * Used for install purposes. 
+	 * 
+	 * @since 2.8
+	 * @access private 
+	 * @see constructor of this class
+	 * 
+	 * @param string $db MySQL database name
+	 * @return void
+	 */
+	function _fuzzy_createdb($db) {		
+		// ensure being connected.
+		if ( !$this->dbh ) return;
+		// proflems already? then nothing to touch.
+		if ( mysql_errno($this->dbh) ) return ;
+			
+		// perform database creation as needed										
+		if (!@mysql_select_db($db, $this->dbh)) 
+			// create database only if it does not exists (Error Number 1049 / Unknown database 'XYZ').			
+			if ( 1049 == mysql_errno($this->dbh) ) 
+				$this->query("CREATE DATABASE `$db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;");				
+	}
+
 	/**
 	 * Selects a database using the current database connection.
 	 *
