Not accessing the DB correctly
-
I thought I set the DB up correctly though I am still very much a novice at this. When I try to open my blog URL I receive this:
*********************************************************
Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.
* Are you sure you have the correct user/password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?
**********************************************************
Now, I have my DB (MySQL v4.0.22-standard) set up like this:
**********************************************************
moojoobe_wordpress
Users in wordpress
moojoobe_wordpre (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect(“DBI:mysql:moojoobe_wordpress:localhost”,”moojoobe_wordpre”,”<PASSWORD HERE>”);
PHP $dbh=mysql_connect (“localhost”, “moojoobe_wordpre”, “<PASSWORD HERE>”) or die (‘I cannot connect to the database because: ‘ . mysql_error());
mysql_select_db (“moojoobe_wordpress”);
*********************************************************
And my wp-config.php set up in accordance the way it should be I believe…:
*********************************************************
<?php
/** WordPress’s config file **/
/** http://wordpress.org/ **/
// ** MySQL settings ** //
define(‘DB_NAME’, ‘wordpress’); // The name of the database
define(‘DB_USER’, ‘blog’); // Your MySQL username
define(‘DB_PASSWORD’, ‘******’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
// Change the prefix if you want to have multiple blogs in a single database.
$table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);
/* Stop editing */
$server = DB_HOST;
$loginsql = DB_USER;
$passsql = DB_PASSWORD;
$base = DB_NAME;
define(‘ABSPATH’, dirname(__FILE__).’/’);
// Get everything else
require_once(ABSPATH.’wp-settings.php’);
?>
Please try to help me. =/ I’m not sure what I’ve been doing wrong.
The topic ‘Not accessing the DB correctly’ is closed to new replies.