Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter bbizz

    (@bbizz)

    I wish I would’ve waited for your reply webraket, that would’ve saved me a lot of time. I spent about 12 hours copying the data over manually.

    Would changing this help or even work after I’ve already copied the data?
    $sites = $wpdb->get_col( “SELECT blog_id FROM {$wpdb->blogs} ORDER BY blog_id ASC LIMIT {$next}, 5” );

    I’m guessing it wouldn’t do any good for tables already created but maybe for new ones?

    Thread Starter bbizz

    (@bbizz)

    Hi Ron,
    It turns out this error was just due to mysql not being configured right.
    “Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:3306 (Operation timed out)”

    Although the page now just displayed this…
    Error establishing a database connection

    I checked the databases and noticed the data wasn’t all copied over to the shard databases. I tried it again after the fsockopen error was fixed but it’s doing the same thing. I can see it did create the tables but there’s no data in them. Oh well at least I can see where the tables go, I may just have to do it manually.

    Thanks again for the help. Oh btw it’s on a VPS with 2GB of ram. I was having issues with the VPS running out of memory and using swap. My host said it was probably due to wordpress and mysql because there was so many tables.

    Thread Starter bbizz

    (@bbizz)

    Honestly I’m not sure if my site is large enough to need sharDB. My host said 5000 tables in one database is probably too many. So I figured I would work on splitting them up into more databases.

    But anyway I’ll look for a programmer or maybe give multi-db a shot.

    Thanks for trying 🙂

    Thread Starter bbizz

    (@bbizz)

    Hi Ron,

    I had require(‘./db-settings.php’); below the database settings in wp-config. But I put it even lower just above the “that’s all” line but I’m still seeing errors on the page…

    Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:3306 (Operation timed out) in /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php on line 521

    Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:3306 (Operation timed out) in /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php on line 521

    Warning: Cannot modify header information – headers already sent by (output started at /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php:521) in /usr/home/user1/domains/mysite.com/public_html/wp-includes/functions.php on line 3125
    Error establishing a database connection

    Thread Starter bbizz

    (@bbizz)

    Hi Ron,
    For right now I was just going to use the old main database for global until I can figure out what tables needs to be copied so I can stop using that the old one. Using the old database as global for now should work right?

    When I enable this line here the page just keeps trying to load…

    add_db_server('global', 0,    '', 1, 1,    DB_HOST, DB_HOST, DB_NAME, DB_USER, DB_PASSWORD);

    I also tried removing the database info from the wp-config.php and then adding all that info to the line above but the same thing happens. Do you have any idea why the page would just keep trying to load? Actually the page stopped trying to load and it says this several times…

    Warning: fsockopen() [function.fsockopen]: unable to connect to DB_HOST:3306 (Operation timed out) in /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php on line 521
    
    Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'DB_HOST' (4) in /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php on line 327

    thanks!

    Thread Starter bbizz

    (@bbizz)

    Thanks Ron that did fix the error above. The migration did seem to work too. Although I did run into another problem. I’m getting this error when I click on a post etc.

    Warning: Invalid argument supplied for foreach() in /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php on line 271
    Unable to connect to : while querying table ‘wp_sitemeta’ (global_r)
    Warning: Invalid argument supplied for foreach() in /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php on line 271
    Unable to connect to : while querying table ‘wp_blogs’ (global_r)
    Warning: Cannot modify header information – headers already sent by (output started at /usr/home/user1/domains/mysite.com/public_html/wp-content/db.php:271) in /usr/home/user1/domains/mysite.com/public_html/wp-includes/ms-settings.php on line 91

    I have this line in db-settings.php commented out because it won’t connect at all if it’s enabled…

    // add_db_server('global', 0, '', 1, 1, DB_HOST, DB_HOST, DB_NAME, DB_USER, DB_PASSWORD);

    I did try to put my info there on that line uncommented but that didn’t seem to work either. I’m not sure if it would fix the error anyway…

    I figured it would use my old database as global for now. So I’m kind of lost here…

    Thread Starter bbizz

    (@bbizz)

    Hi Ron, thanks for the reply.

    Yes the configuration for db-settings.php is in the /* */

    It’s between these lines…
    /* Use this configuration for a hexidecimal based hash

    And this one…

    // instructions for adding vip blogs at the bottom of this confg filei
    */

    I didn’t migrate my data over. It’s still in the main database that I first made when installing wordpress. I saw you posted a developer version(I think it was) and I planned on using that for migrating. But that error appears on the pages and I can’t even login. Although it does seem to be connecting to my original database because the pages still come up.

    Thanks

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