I know very little about MySQL, other than wanting to throw it off the nearest cliff every time I work with it (LOL), but I was poking around in my WordPress wp-config.php file to see what kind of MySQL might be in there. This is what I have, pretty much straight from the WP folks (all my info is changed to generic stuff of course).
Code: Select all
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'databaseuser');
/** MySQL database username */
define('DB_USER', 'mydatabase');
/** MySQL database password */
define('DB_PASSWORD', 'sUpErCoOlPaSsWoRdHeRe');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
define('WP_MEMORY_LIMIT', '64M');
...Now that I'm looking at it, I have no idea if writing your stuff like this would help matters, or if this is WordPress-specific. Agh.
Also, I have this snippet my good friend helped me write when I was trying to make a database back in the day:
Code: Select all
$host = "localhost";
$user = "databaseuser";
$pass = "supercoolpassword";
$db = "mydatabase";
mysql_connect($host, $user, $pass);
mysql_select_db($db) or die("Unable to select database");
To the best of my memory, this did work--that second bit with the mysql_connect and mysql_select_db stuff may be the missing piece for you?