Error establishing a database connection
-
Hi
Here’s my problem. I have direct access (through remote desktop) to a windows 2003 server (I’m the sa). I wanted a blogging program but the non perl/php/mysql options sucked so I did some research and decided to try wordpress. Having only used javascript/vbscript/asp/t-sql etc. (all microsoft, all the time), but having experience building web sites and apps I figured this would be a fun learning experience. It took me awhile to install PHP 4.3.3 and MySQL 3.23.49. I have wordpress set-up as a virtual directory as /wp/ in the root of my site. when I run /wp/wp-admin/install.php I get the error establishing db connection error. My wp-config file looks like this
<?php
/** WordPress's config file **/
/** https://www.ads-software.com/ **/
// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'blog_user'); // Your MySQL username
define('DB_PASSWORD', 'blog_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');
?>
I use mysqlcc to administer the database. I have created a database called wordpress and givin the user: blog_user full permissions. Using this interface connected as the ‘blog_user” I can create/delete tables, etc.
I have skimmed through the wp-install.php code looking for where it throws this error but can’t figure out where it is going wrong. If this was asp and SQL server I am confident I could troubleshoot this…
I am having a feeling that the problem lies with php accessing MySQL. I don’t understand enough of the syntax to write a script to test the database connection from my web page. This is probaly either a file or network permission problem but I don’t know. I am still new to this server OS and still figuring out its quirks. Any help with this would be appriciated. Thanks
- The topic ‘Error establishing a database connection’ is closed to new replies.