WordPress.org

Support

Support » Multisite » [Resolved] Installing multisite yields "Error establishing database connection" error

[Resolved] Installing multisite yields "Error establishing database connection" error

  • Hi, when I install multisite I get an “Error Establishing Database Connection” error.
    When I attempt to log in to wp-admin, it tells me to repair the database. When I try to do that, I get this message:

    wp_1_posts: Table ‘bigwater_wp.wp_1_posts’ doesn’t exist
    wp_1_comments: Table ‘bigwater_wp.wp_1_comments’ doesn’t exist
    wp_1_links: Table ‘bigwater_wp.wp_1_links’ doesn’t exist
    wp_1_options: Table ‘bigwater_wp.wp_1_options’ doesn’t exist
    wp_1_postmeta: Table ‘bigwater_wp.wp_1_postmeta’ doesn’t exist
    wp_1_terms: Table ‘bigwater_wp.wp_1_terms’ doesn’t exist
    wp_1_term_taxonomy: Table ‘bigwater_wp.wp_1_term_taxonomy’ doesn’t exist
    wp_1_term_relationships: Table ‘bigwater_wp.wp_1_term_relationships’ doesn’t exist
    wp_1_commentmeta: Table ‘bigwater_wp.wp_1_commentmeta’ doesn’t exist

    It seems to have changed the table prefix from wp_ tp wp_1
    I deactivated all plugins before attempting the install and followed instructions as best I could.
    Is this something on the server end, or is it a problem with wordpress?
    Please advise, thanks!

Viewing 15 replies - 1 through 15 (of 20 total)
  • Server end.

    Your SQL ID doesn’t have permissions to CREATE tables on your database. Go make sure it has full permissions (ask your host if you don’t know what that means).

    I looked at the user in cpanel; it had all privileges EXCEPT execute checked. I checked it, update the user, but when I check the user again it’s unchecked. Maybe that had something to do with the error…
    Anyway, I exported my blog, dropped all the tables, reinstalled wordpress, inported the blog xml file, and repeated the multisite install. Now it works.

    Interesting, I have come across exactly the same problem with one host …

    Both the “Error establishing database connection” and not having the privilege to execute.

    Did you ever work out what the problem was?

    That sounds very much like a Database creation issue. That is the DB was built in such a way as permissions were restricted.

    I noted with our hosts that they do not give permission to the database users to ‘Execute’.

    ‘Create’ is fine.

    I have no idea why, techs are pretty hopeless.

    BUT … I made a new database and it is functional, I can create new sub-domain blogs, so that removes problems with the actually server.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Good find. 🙂

    Hi… I have the same problem on DreamHost.

    The SQL user options are:

    Select, Insert, Update, Delete, Create, Drop, Index, Alter

    Is this just not going to work?

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Is there anything called “All”? Did you chekc them all and try it? Did you talk to your host?

    They are all checked. I asked the host and they said execute is not possible, but that others have set up WP Multisite ‘within the last couple months’.

    Specifically, I got WordPress working from a fresh install, followed the instructions to a ‘T’ and got this error.

    If I comment out everything below define('WP_ALLOW_MULTISITE', true);
    things work

    define('WP_DEBUG', false);
    
    define('WP_ALLOW_MULTISITE', true);
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'bigcityfocus.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    
    /* That's all, stop editing! Happy blogging. */

    Also, the host confirmed that the wildcards are set up.

    Maybe I’ll remove it and do the 1-click install, then do the WP MS setup. Then the db will be made by the server, instead of by my user.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Try it and report back. 🙂

    Hello… Has there been any update on this?

    I did what I described in the my last post, above, and it worked. I don’t remember any special details, I just deleted everything, then used the system’s 1-click install (this was on DreamHost) and it all worked when I went back through the setup sequence.

    I have followed this procedure exactly, as well.

    I get “Error establishing a database connection” after the final step of activating the options in wp-config.php

    Repair Database shows:

    wp_1_posts: Table ‘gmtwp.wp_1_posts’ doesn’t exist
    wp_1_comments: Table ‘gmtwp.wp_1_comments’ doesn’t exist
    wp_1_links: Table ‘gmtwp.wp_1_links’ doesn’t exist
    wp_1_options: Table ‘gmtwp.wp_1_options’ doesn’t exist
    wp_1_postmeta: Table ‘gmtwp.wp_1_postmeta’ doesn’t exist
    wp_1_terms: Table ‘gmtwp.wp_1_terms’ doesn’t exist
    wp_1_term_taxonomy: Table ‘gmtwp.wp_1_term_taxonomy’ doesn’t exist
    wp_1_term_relationships: Table ‘gmtwp.wp_1_term_relationships’ doesn’t exist
    wp_1_commentmeta: Table ‘gmtwp.wp_1_commentmeta’ doesn’t exist

    My database user has, as far as I can tell, the proper database permissions:

    | GRANT ALL PRIVILEGES ON *.* TO ‘wpuser’@’localhost’ IDENTIFIED BY PASSWORD ‘…’ WITH GRANT OPTION |
    and
    GRANT ALL PRIVILEGES ON *.* TO ‘wpuser’@’%’ WITH GRANT OPTION

    The things that bug me are:
    – Obviously, WordPress already created some tables using that id
    – There is absolutely no debugging information, even with any combination of the following:

    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);
    define(‘WP_DEBUG_DISPLAY’, false);
    define(‘SAVEQUERIES’, true);

    Any thoughts would be greatly appreciated!!!
    Please help save my hair!

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Resolved] Installing multisite yields "Error establishing database connection" error’ is closed to new replies.
Skip to toolbar