• Resolved bbizz

    (@bbizz)


    Hi,
    I’ve installed SharDB but for some reason my main site displays this error after I installed it.

    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

    I set the db-settings.php like this…

    // how many characters of hexidecimal hash
    $shardb_hash_length = 1;
    // what is the prefix of your blog database shards (everything before the hexidecimal hash)
    $shardb_prefix = ‘user1_wpmu_’;
    // set a string to be used as an internal identifier for the dataset
    $shardb_dataset = ‘abc’;
    // do you want to put your primary blog (blog_id 1) in its own ‘home’ database?
    $enable_home_db = false;
    // how many, if any, VIP databases do you have?
    $num_vipdbs = 0;
    // add this to set the write master read priority (default 1)
    // $shardb_master_read = 99;
    // add this if all of your databases are on a local server
    $shardb_local_db = true;
    // use this function to add a read slave host
    // add_slave($read_priority, $hostname, $local_hostname, $user, $password);

    I made the databases like this…
    user1_wpmu_0 to user1_wpmu_9 then user1_wpmu_a user1_wpmu_f

    I did everything else the instructions told me. I’m trying to use this on an existing wordpress site. I’d really appreciate any help with this.

    TIA

Viewing 14 replies - 16 through 29 (of 29 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    Tables for new blogs/sites are automatically created in the right database. You only need to migrate the data when you are setting SharDB up.

    @webraket – Someone had already sent me a note on that issue. I hadn’t had a chance to test it yet. I would still like to be able to catch an error if there is one creating the table (which that fix doesn’t check for).

    I set acording to:
    require_once(‘db-settings.php’);
    /* That’s all, stop editing! Happy blogging. */

    but in my admin show error for loading link
    domain.com/wp-admin/tools.php?page=shardb_migrate
    :

    you must configure your database settings by adding require(‘./db-settings.php’); to your /home/domain/public_html/wp-config.php for the migration process to work

    Plugin Author Ron Rennick

    (@wpmuguru)

    you must configure your database settings by adding require(‘./db-settings.php’); to your /home/domain/public_html/wp-config.php for the migration process to work

    If you are running suPHP or suExec, check the permissions on the db-settings.php file. If the permissions are wrong with either of those running, you don’t have permission to access the file.

    Also, did you add your configuration to db-settings? The sample configuration in db-settings.php is commented out.

    I set permission on 755 but show same error.

    codes :

    /* Add your configuration here */

    $shardb_prefix = ‘domain_wp’;
    $enable_home_db = true;
    $shardb_local_db = true;

    /* Use this configuration for a hexidecimal based hash

    Plugin Author Ron Rennick

    (@wpmuguru)

    You are missing some required configuration values

    // how many characters of hexidecimal hash
    $shardb_hash_length = 1;
    // what is the prefix of your blog database shards (everything before the hexidecimal hash)
    $shardb_prefix = 'user1_wpmu_';
    // set a string to be used as an internal identifier for the dataset
    $shardb_dataset = 'abc';
    // do you want to put your primary blog (blog_id 1) in its own 'home' database?
    $enable_home_db = false;

    ok tnx,resolve.

    I whene click on (migrate global table) show:
    wp_blogs copied to domain_wpglobal
    wp_registration_log copied to domain_wpglobal

    but isnot wpglobal in my data base list.
    why?

    or with click on migrate sites show:
    wp_2_pollsa copied to domain_wpc8
    wp_2_pollsip copied to domain_wpc8
    wp_2_pollsq copied to domain_wpc8

    but wpc8 in empty!!!
    and show just tables from domain.com and blog1.com:
    wp_ and wp_2_

    after I upload db.php,show in admin:

    Connected to localhost:3306 but unable to select database ‘domain_wpglobal’ while querying table ‘wp_sitemeta’ (global_r)Connected to localhost:3306 but unable to select database ‘domain_wpglobal’ while querying table ‘wp_blogs’ (global_r)
    Warning: Cannot modify header information – headers already sent by (output started at /home/domain/public_html/wp-content/db.php:365) in /home/domain/public_html/wp-includes/ms-settings.php on line 94

    please help me.

    Plugin Author Ron Rennick

    (@wpmuguru)

    I recommend you consider buying the installation guide. We wrote that as an inexpensive alternative to hiring me to do the installation for you.

    how many is installation guide?
    too how many if you install for me?

    but I have 4 sites with wp multisite,and I want learn managing shardb myself.

    Plugin Author Ron Rennick

    (@wpmuguru)

    I buy guide.

    my database:
    1.1 gb size , 7,547,844 row,
    and wp_2_postmeta has 1,908,860 row , 230mb size
    and wp_2_term_relationships has 3,747,716 row and 207mb size

    after migrate wp_2_postmeta or wp_2_term_relationships Cleave in Several database??
    Otherwise for example even if I set domain_09 for wp_2_postmeta or wp_2_term_relationships it(domain_09) will be 230 mb size?

    Plugin Author Ron Rennick

    (@wpmuguru)

    and wp_2_postmeta has 1,908,860 row , 230mb size
    and wp_2_term_relationships has 3,747,716 row and 207mb size

    With large tables like that you’ll probably need to manually copy those to the correct shard. Your webserver has a time limit on how long the request can run. Really large tables like that are probably running to the time limit and getting killed off by the webserver.

    Have you checked your post tags and categories to see if you can remove some of those.

    One thing you could do with the postmeta table is delete all the lock records (they keep track of who is editing the posts).

    If you have ssh access you can copy a table manually with

    mysqldump -u username -ppassword old_db wp_2_postmeta | mysql -u username -ppassword new_db

    yes, my site is on the server with:
    4 cpu,8gb ram,shared whit private ip
    and with themes deluxtheme my server downed.therfore I use now defual theme wordpress.

    my site have 320,000 post after 2 years,and all are useful.
    posts inport automaticaly by autoblog plugin from another sites.

    If you have ssh access you can copy a table manually with

    mysqldump -u username -ppassword old_db wp_2_postmeta | mysql -u username -ppassword new_db

    can I copy it by seting below code in config location? :
    add_db_table( ‘wp_2_postmeta’, ‘domain_08’ );
    ?

    too, my site is news site and import news from another site,it is in 10 language(10 blog in subdomain):en.domain.com,it.doamin.com,…
    after 1 or 2 year other table in another language also will be large size,now you can help me for future and resolve this problem?

    thanks a lot

    If you have ssh access you can copy a table manually with

    mysqldump -u username -ppassword old_db wp_2_postmeta | mysql -u username -ppassword new_db

    too new_db will be larg size,about 230mb
    and still it can down server?

    Plugin Author Ron Rennick

    (@wpmuguru)

    can I copy it by seting below code in config location? :
    add_db_table( ‘wp_2_postmeta’, ‘domain_08’ );
    ?

    No, you have to copy it via the command line per my previous post or export with phpmyadmin and import into the other db.

    too new_db will be larg size,about 230mb
    and still it can down server?

    With 320,000 posts you’ll have to make some decisions about what content you want to keep. That’s the largest number of posts that I’ve seen in a single site.

Viewing 14 replies - 16 through 29 (of 29 total)

The topic ‘[Plugin: SharDB] connection problem…’ is closed to new replies.