Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cannot select DB

  • I have a WP 2.3 blog and a bbpress 0.83 install 0n a LAMP server and everything seems fine.

    I’m now creating a staging server on a Vista PC. I have WP 2.3 installed fine. When I install bbpress (i.e. browse to bb-admin/install.php) I get the dreaded “Cannot select DB” message.

    I have tried both…

    1. creating a new db for bbpress

    2. using the existing WP db and username

    I’m using mySQL 5.0.37 and PHP 4.

    There are other topics that talk about this error, but they don’t seem to be relevant to my case. Please point me in the right direction if I have missed something in the forums.

Viewing 5 replies - 1 through 5 (of 5 total)

  • chrishajer
    Participant

    @chrishajer

    If it cannot connect to the database, but the database server is working with WordPress, then I suspect something is wrong in the config.php for bbPress. Since we can’t help you with that on your local machine, can you try connecting to that database using the connection details you entered in config.php, with some other tool (phpMyAdmin or whatever comes with a MySQL install)?

    Thanks Chris.

    > can you try connecting to that database

    Yes, I did this with the MySQL cmd line client and I can connect fine. The bbpress settings are really simple:

    // ** MySQL settings ** //

    define(‘BBDB_NAME’, ‘wordpress’);

    define(‘BBDB_USER’, ‘wordpress’);

    define(‘BBDB_PASSWORD’, ‘XXXXXXXX’);

    define(‘BBDB_HOST’, ‘localhost’);

    define(‘BBDB_CHARSET’, ‘utf8’);

    define(‘BBDB_COLLATE’, ”);

    And for WP:

    // ** MySQL settings ** //

    define(‘DB_NAME’, ‘wordpress’);

    define(‘DB_USER’, ‘wordpress’);

    define(‘DB_PASSWORD’, ‘XXXXXXXX’);

    define(‘DB_HOST’, ‘localhost’);

    Here is the info from the MySQL database after connecting as the ‘wordpress’ user:

    mysql> show databases;

    +


    +

    | Database |

    +


    +

    | information_schema |

    | wordpress |

    +


    +

    3 rows in set (0.00 sec)

    Is there any way to get more detailed diagnostic info from the install process?


    chrishajer
    Participant

    @chrishajer

    Is there anything logged by MySQL? Does the wordpress user actually exist, and is the password in both wp-config.php and (bbpress) config.php the same?

    Sorta stumped …

    Yes, the wordpress user exists. The passwords are the same.

    The really strange thing now is that WP has stopped working (it did before I started tinkering with bbpress). I get “Error establishing a database connection” when I try to view the blog.

    Even weirder, it seems that IIS “forgot” that index.php was a valid default page. I had to go back in and change this setting.

    Well, problem solved. The WordPress FAQ suggests resetting your MySQL password manually if you have problems connecting to the db. I did so using the MySQL client and now both WP and bbpress seem to be working fine.

    Thanks for the input.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar