I download the latest wordpress, setup as normal and follow the instructions here for multisite:
I get the “error establishing database connection” and all searches (like google wordpress mu “Error establishing a database connection”) have the silliest advice “make sure your db user has permissions to create tables”. REALLY? Think about it. It was that db user THAT CREATED THE WORDPRESS INSTALL TABLES TO BEGIN WITH.
But just for fun I put in the root user and pwd to double-check (I own the box). Same results.
I try the repair database route and get the same results as this guy, a lot of wp_2…. tables are missing:
Which gets me to thinking… “2”. I have this mysql install setup for replication and this server happens to have auto_increment_offset set to 2.
I go edit the following tables and change site id to 1 in all of them (they are all 2):
wp_blogs, wp_site, wp_sitemeta
presto, it works.
Bottom line, once again wordpress engineers don’t think about any standard database practices and just assume that a PRIMARY key on auto-increment will be “the next number”. So they think the default site ID must be 1.
This is right up there next to their other poor db habits like not having unique indexes on their tables. Hard to keep replicated databases from drifting without unique keys.
- The topic ‘Multisite installation failure on replicated mysql’ is closed to new replies.