WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (9 posts)

  1. rsfeller
    Member
    Posted 7 years ago #

    I'm sure this is the standard newbie concern, it's never easy like the 5 minute setup, is it!?!?

    all on my server:
    PHP 4.3.10.10
    mySQL 4.1.20 mysqld-nt community edition
    ODBC mySQL Driver 3.51.12.00 (latest)
    Win2k Server SP4 with IIS 5.0

    databasename: wordpress (orignal eh?)
    user: root
    pass: xxxx
    server: localhost

    yes the mysql 4.1 service is running
    yes i can connect to the database via the cmd console
    yes i can connect to the database via MySQL Administrator
    yes database has all GRANT privileges foor root@localhost (also tried with other user/pass)
    yes the wp-config.php is setup correctly.

    I've setup several CMS solutions with MySQL and PHP stacks, each liking it's own flavor and versions. All have never worked "straight out of the box" so I'm not to concerned here yet as I may be missing something obvious...but I've been playing with this for 3 hours now tonight, and I'm calling it a day! I'll give it 48 more ours before I pass on WORDPRESS.

    yes I have read many many posts on this config error message, but I'm still scratching my head.

    Next steps to solving this issue gang?

    Thank you for your time and consideration.
    Shawn

  2. klklaser
    Member
    Posted 7 years ago #

    I'm no server expert, just a user with a shared hosting account, and I have zero experience with the 2.0 series. However, from wp-config.php have you tried:

    // ** MySQL settings ** //
    define('DB_NAME', 'wordpress');    // The name of the database
    define('DB_USER', 'root');     // Your MySQL username
    define('DB_PASSWORD', 'xxxx'); // ...and password
    define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
    
    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!

    Have you tried making the DB_NAME and DB_USER variables the same name?

  3. Doodlebee
    Member
    Posted 7 years ago #

    I know this sounds nuts, but when I've triple-checked to be sure my username and password (et al) are correcet, and they still aren't connecting, I always find that I've put a space somewhere shouldn't have. For example:

    define('DB_NAME', 'wordpress');

    I've accidentally put in:

    define('DB_NAME', ' wordpress');

    (see the space before "wordpress"?)

    If all of my settings are correct, I've *always* found that this was the mistake I've made - put a space (or a period, or some accidental keystroke) between the '' of those top four lines. (And also make sure you're using Notepad to edit the file...and also make sure you've removed "-sample" from the filename...and saved it as PHP not TXT...)

  4. rsfeller
    Member
    Posted 7 years ago #

    klklaser,

    can you explain the logic of your idea? why would I have the DB name and user the same? has this only worked for you? do you mean only making them the same on the config or in "reality"? is this a bug or just a crazy idea?

    doodlebee,

    human error is always possible but i have done this 101 times tonight, I think I would have got it right eventually!

    thanks.
    shawn

  5. vkaryl
    Member
    Posted 7 years ago #

    rsfeller - I have over 30 wp installs for which I'm responsible. Some of them have singular database name/database user pairs; others have db name/db user pairs identical - it depends on the host, the client, the installer, etc.

  6. klklaser
    Member
    Posted 7 years ago #

    rsfeller wrote:

    can you explain the logic of your idea? why would I have the DB name and user the same? has this only worked for you? do you mean only making them the same on the config or in "reality"? is this a bug or just a crazy idea?

    Actually, the reason I posted was because nobody had replied to you. The second reason I posted was that I noted that you had written:

    databasename: wordpress (orignal eh?)
    user: root
    pass: xxxx
    server: localhost

    Had you entered that in the wp-config.php file precisely as written, then clearly it wouldn't work. But perhaps it was slang.

    It seemed a good idea to clarify, discreetly.

  7. rsfeller
    Member
    Posted 7 years ago #

    still looking for useful ideas?

  8. seraphstream
    Member
    Posted 7 years ago #

    I guys, i don't able to install wordpress on
    Oracle Errors ora

    becuase i don't understand how connect oracle db...

    Please help me!!!

    thank you

  9. rudolf45
    Member
    Posted 7 years ago #

    Oracle?
    Did you read the requirements?
    http://wordpress.org/about/requirements/
    WP works only with MySQL database.

Topic Closed

This topic has been closed to new replies.

About this Topic