• Resolved db242

    (@db242)


    All, I am having this issue and not sure exactly why. Granted i’m a sincere noob, but I have searched without really knowing what to search for, and if this has been covered, please just point me to the solution and many thanks will be coming to you:

    Background:
    – WordPress v1.5.2.
    – Existing blog running with the default setting $table_prefix = ‘wp_’ set in the wp-config.php file.
    – Existing blog set up and running with MySQL database.
    – Existing blog installed under ~/www/
    – New blog to have it own MySQL database.
    – New blog installed under ~/www/blog2
    – Second copy of WP already installed into the new blog2 directory
    – Editted wp-config.php file with new MySQL database information settings.

    Want:
    – Add a second or a third WP blog off the same domain/host.
    – Ability for each blog to behave independently.

    Issue:
    – When I try to set up the new blog I get the following error mgs:
    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?

    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
    ___________________________________________

    I am positive that the wp-config file is correct and the host server is running.

    what am I doing incorrectly?

    I am clay in your hands, mold me ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • For the first blog, you have the 4 pieces of connection info:
    db name
    db user
    db pass
    localhost and you also have the table_prefix of ‘wp_’

    To install another blog, that will use the same database, copy that working config file and change only the ‘wp_’ to something else.
    ‘wp2_’
    ‘wprabbits_’
    ‘wordpress2_’

    It’s this – and this alone – which keeps different installs apart in the db.

    That make sense?

    rustindy

    (@rustindy)

    Multiple WP blogs can run on a single database simply by changing each installation’s wp-config.php file to have a unique table prefix, but the database host and login information remains unchanged (assuming that your MySQL login has the right to create new tables in the database).

    If you have created an entirely new database for a new WP install, make sure that the MySQL login you’re using has rights to that database. If you’re positive that the information in your wp-config.php file is correct, then that might be the problem. Check your MySQL user’s rights and verify that the new database actually exists, and let us know.

    Thread Starter db242

    (@db242)

    thanks guys for the quick response: I created a new MySQL db for the new blog, I like to keep everything separate. I installed a new copy of WP to the ~www/blog2 folder and changed the wp-config.php to the correct information on the lines:
    db name
    db user
    db pass
    localhost

    and left the table_prefix of ‘wp_’ the same since i figured it will only be looking at the new db.

    Since the blog information is in ~www/blog2 and not the root folder, would this cause any issues? I left the localhost as the default, localhost, should that be something different since it is not in the root folder?

    Looks like everything is fine there ??

    Thread Starter db242

    (@db242)

    i am checking the config file again for accuracy. the new db exists and the user has all rights to it. ponderous, man, ponderous.

    Thread Starter db242

    (@db242)

    everything is accurate.. but still no go…

    ‘no go’ ?

    rustindy

    (@rustindy)

    If you can send queries directly to the MySQL database (via phpMyAdmin or MySQL Query Browser or whatever), try and connect to that database with the user information that WP is trying to use, and try creating a table (create table tblTest). Let us know if that works (this is just to make double-damn sure that the user has the necessary rights).

    Thread Starter db242

    (@db242)

    I’m not sure what was wrong. i could not login to the new db, so deleted it and reinstalled WP on the subdomain using Fantastico and now everything works! Ponderous, man, ponderous. but thanks for all you troubleshooting efforts!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Two blogs on one host’ is closed to new replies.