WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Installing multisite yields "Error establishing database connection" error (21 posts)

  1. Ben Dunkle
    Member
    Posted 3 years ago #

    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!

  2. 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).

  3. Ben Dunkle
    Member
    Posted 3 years ago #

    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.

  4. still giving
    Member
    Posted 3 years ago #

    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?

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

  6. still giving
    Member
    Posted 3 years ago #

    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.

  7. Good find. :)

  8. richoid
    Member
    Posted 3 years ago #

    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?

  9. Is there anything called "All"? Did you chekc them all and try it? Did you talk to your host?

  10. richoid
    Member
    Posted 3 years ago #

    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. */
  11. richoid
    Member
    Posted 3 years ago #

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

  12. richoid
    Member
    Posted 3 years ago #

    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.

  13. Try it and report back. :)

  14. Loueze
    Member
    Posted 2 years ago #

    Hello... Has there been any update on this?

  15. richoid
    Member
    Posted 2 years ago #

    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.

  16. jamie3000
    Member
    Posted 2 years ago #

    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!

  17. jamie3000
    Member
    Posted 2 years ago #

    Well, I don't know what happened... I went away for a while, removed the network tables, ran the procedure for about the 5th time, and this time it worked!

    ???

    I have no idea, and there's still no debugging output. Odd.

  18. kermit666
    Member
    Posted 2 years ago #

    I had a similar problem (I coludn't even access my admin dashboard) and this site helped me.

    In the end it turned out I didn't have this variable set in my wp-config.php:

    define('MULTISITE', true);

    It's funny, because I think I copied everything WP gave me during the multisite setup, but it could be I skipped this line, because I already had define('WP_ALLOW_MULTISITE', true); inside.

  19. Ulrich Palha
    Member
    Posted 2 years ago #

    After following the instructions to install multisite support http://codex.wordpress.org/Create_A_Network, I also got the "error establishing database connection" message.

    However, like kermit666, I also missed out the

    define('MULTISITE', true);

    Adding this to the wp-config.php fixed the issue

  20. David100351
    Member
    Posted 2 years ago #

    Can I join the queue of people who were trying to be too clever by omitting the line

    define('MULTISITE', true);

    because there was something very like that I had already added.

    Thank you kermit666 and this forum.

  21. kermit666
    Member
    Posted 2 years ago #

    He he :D Glad I could be of help.

    Perhaps this shows that the multisite installation could be a bit user-friendlier, since we all fell into the same trap...

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic