• Resolved graywave

    (@graywave)


    I’m trying to set up WP on http://www.nsiweblog.com, with hosting provided by Expert Host. I copied the files into the /www directory, and created a database. The database seems to be hosted at sql10.webminder.com, but WP won’t connect to it when I try to install. Localhost don’t work.

    I know that similar topics have been covered before, but it just won’t work for me, no matter what combinations of host names I try.

    Here is my original wp-config.php code:
    code
    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘wordpressblog’); // The name of the database
    define(‘DB_USER’, ‘wordpress’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘******’); // …and password
    define(‘DB_HOST’, ‘http://sql10.webminders.com&#8217;); // 99% chance you won’t need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* Stop editing */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>
    /code

Viewing 15 replies - 1 through 15 (of 19 total)
  • try setting localhost as your db_host:

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'accountusername_dbname'); // The name of the database
    define('DB_USER', 'accountname_dbusername'); // Your MySQL username
    define('DB_PASSWORD', 'your database pass'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    so your db name will be the account username you use to login to your host account, bob or fred for example and then the name of the database, wordpress for example, so the result is:

    bob_wordpress

    your database username is the name used in the database, so it woul dbe account name and db username:

    bob_wpking where wpking is the username for the database.

    Thread Starter graywave

    (@graywave)

    No, I tried it again but it still doesn’t work. I have tried it in so many combinations my head is spinning…

    Any other help??

    wp-config.php looks like this now:
    code
    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘wordpressblog’); // The name of the database
    define(‘DB_USER’, ‘wordpress’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘*****’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* Stop editing */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    Is your version of PHP using the mysqli library? If it is not, and you are using MySQL 4.1, then you can’t authenticate from PHP scripts.

    Your choices are to either downgrade MySQL to 4.0 or to recompile PHP and tell it to use mysqli instead of mysql.

    That was the situation here, when I did a complete reinstall of my system and decided that I wanted MySQL 4.1 for sub-selects. I’m back with 4.0 now though.

    @graywave
    try it without the http:// – I mean like this:
    define('DB_HOST', 'sql10.webminders.com'); // // 99% chance you won't need to change this value

    Thread Starter graywave

    (@graywave)

    @cameroon
    My hosting provider says that it supports the following:

    * PHP Version 4.3.0
    * MySQL 3.23.54

    I don’t know about the mysqli library.

    @moshu
    Thanks, but I already tried that. I think that I am going to try a different host.

    Anybody have experience with Cedant.com, SiteGround.com, or ICDSoft.com ?

    Thread Starter graywave

    (@graywave)

    Thank you all for trying to help!!

    Try finding out if your hosting provider has SELinux installed.

    I had the same problem of not being able to connect to the database. I tried everything. Literally 4 hours of trying different combinations.

    I am using Fedora Core 3 which has SELinux enabled by default. I disabled SELinux in desperation, rebooted and hey wordpress works.

    I don’t know how SELinux works so I will have to look into this to solve the problem properly.

    Hope this helps.

    I am having the same problem. My website is hosted by godaddy.com. they are using PHP version 4.3.11 and the database server they tell me is:
    mysql.secureserver.net
    funny thing is that Bob Parsons, the founder of godaddy, seems to be using the wordpress to power his blog, so I figure there’s got to be a way for me to get this amazing wp up and running. Is there?

    farrokh – what exactly is your problem ?

    I get the “Error establishing a database connection” message when I point my browser to /wp-admin/install.php

    BTW, thanks for lightening fast response podz 🙂

    If I remember right, at godaddy:
    username & db name are the same
    pass – you set
    host is as you’ve specified.

    The Boss there does indeed blog …. double checked everything in your file ?

    There is only one database created in my website and it is “farrokh” and
    wp-config.php is as follows:

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘farrokh’); // The name of the database
    define(‘DB_USER’, ‘farrokh’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘*****’); // …and password
    define(‘DB_HOST’, ‘mysql.secureserver.net’); // 99% chance you won’t need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* Stop editing */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    ‘mysql.secureserver.net’

    Isn’t there meant to be a number somewhere there ?

    Actually, yes…
    ‘mysql39.secureserver.net’

    let me try it like that and see what happens.

    Now I get this:

    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 mysql39.secureserver.net .

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘trouble installing WP – can’t connect to database’ is closed to new replies.