Skip to:
Content
Pages
Categories
Search
Top
Bottom

Error on installation – DB Error: cannot select


  • angelamaria
    Member

    @angelamaria

    Hello,

    I’m planning to using bbPress on a WP site/blog I am currently working on, on my local. WordPress is up and running already, a relatively clean install save for a couple of themes, and some entries. No plugins yet. I download bbPress, upload it underneath my WP root directory (where the blog is), change config to match WP config (for my local it’s just changing out the database name; I have a username/password account set up already for each of test installs), and try to install. I get:

    DB Error: cannot select

    …on all pages. I’ve looked at both bb-config and wp-config and the database values are identical, except for the suffix variable naturally. I’ve checked the database, only wp_* tables are there. I am using a fresh bbPress download.

    Just for completeness’ sake (comments removed for brevity):

    bb-config.php excerpt:

    /** The name of the database for bbPress */

    define('DB_NAME', 'pugad-lawin');

    /** MySQL database username */

    define( ‘BBDB_USER’, ‘username’ );

    /** MySQL database password */

    define( ‘BBDB_PASSWORD’, ‘password’ );

    /** MySQL hostname */

    define( ‘BBDB_HOST’, ‘localhost’ );

    /** Database Charset to use in creating database tables. */

    define( ‘BBDB_CHARSET’, ‘utf8′ );

    /** The Database Collate type. Don’t change this if in doubt. */

    define( ‘BBDB_COLLATE’, ” );

    /** snip snip **/

    /**

    * bbPress Database Table prefix.

    *

    * You can have multiple installations in one database if you give each a unique

    * prefix. Only numbers, letters, and underscores please!

    */

    $bb_table_prefix = ‘bb_’;

    wp-config.php excerpt:

    /** The name of the database for WordPress */

    define('DB_NAME', 'pugad-lawin');

    /** MySQL database username */

    define(‘DB_USER’, ‘username’);

    /** MySQL database password */

    define(‘DB_PASSWORD’, ‘password’);

    /** 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’, ”);

    /** snip snip **/

    /**

    * WordPress Database Table prefix.

    *

    * You can have multiple installations in one database if you give each a unique

    * prefix. Only numbers, letters, and underscores please!

    */

    $table_prefix = ‘wp_’;

    Again, I have a username/password user setup on my local MySQL database for testing purposes, so yes, it is expected that those will be staying the same.

    Any info on this would be great. Thanks!

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

  • chrishajer
    Participant

    @chrishajer

    You said ‘change the database name’ – did you create another database to install bbPress into? There’s no need for that, but I am curious if that’s what you did.

    It’s a pretty simple error – one of your connection details is incorrect. Maybe you need another set of eyes to look at it. Or, if it’s a local install, maybe you can look at MySQL errors to see what’s being logged.


    angelamaria
    Member

    @angelamaria

    I said change the database name since I’m changing it from the default entry in **-config-sample.php to the same database name as on my wp-config.php :)

    I found the error — basically I had copy-pasted the whole database name line, quite unthinkingly; hence the constant was also renamed. Fixed now :D


    chrishajer
    Participant

    @chrishajer

    I’m not picking on you, but this is one of the dangers of posting an edited config in the forums here. You might unintentionally edit (or now edit) something important, in this case critical.

    The error message is correct, no matter how many times you think you’ve checked it. You sometimes do need another set of eyes to go over the actual configs to see the simplest mistake.

    Glad you got it working.

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

You must be logged in to reply to this topic.