• This is the error I receive when running the install script for new-homes-loudoun-county.com/blog/wp-admin/

    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?

    The db installation was successful and I edited the wp-config file to display the below:

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

    Please advise
    Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • Do you have a MySQL database?

    Have you created wp-config.php with the information about the database that you created?

    Thread Starter v2006

    (@v2006)

    Thanks for your swift response

    Yes I have created a MySQL database
    Yes I have created wp-config.php with the information about the database that I created

    Do I need to add anything to the .htaccess file?

    Sorry, I went back and read the OP and realised that my question was entirely irrrelevant.

    If the install can’t connect to the database then it *must* be something wrong, either with the database or the username/password that you’ve specified in the wp-config.php.

    You shouldn’t need to do anything with the .htaccess initially.

    Thread Starter v2006

    (@v2006)

    Thanks

    According to the cpanel I have a database installed
    and am using the same UN and PW for login access to the cpanel

    Is it possible that the site can’t read .php files
    and therefore the script won’t run?
    I am using .html and .shtml for the main web site.

    Is there a way to run a check on the database?

    The site can run php files, the install is a php and it’s running that ok. It still suggests a username or password problem I’m afraid.

    Can you humour me and just go check ( can you get to phpmyadmin?) that you have associated the MySQL Database and the Username in cPanel?

    I have done this more than once where I create both but forget to tell the system that the database will use this username.

    Ta!

    Thread Starter v2006

    (@v2006)

    Under phpadmin it says

    newloud_blog (0)
    No tables found in database.

    Create new database
    No Privileges(in red)

    Does this mean I have no databases created?

    No, the database is there – newloud_blog(0) – the zero means there’s no tables.

    It’s not easy to describe from memory, but if you go to the “MySQL Databases” tab in cPanel it will show you the databases and the users you’ve created.

    Ah, crap. Wait one, I’ll go look at mine to get the information right.

    Right, under MySQL Databases in cPanel you should see “Current Databases”, under that is your database. Is there lots of information about “connection strings” or does it just go on down to Current Users?

    If there’s no “connection strings” you need to scroll down a little to “add users to your databases”.

    Select the user and the database, set the privileges (ALL is fine) and then hit Add User To Database.

    I hoping this is where the problem lies or I am officially stuck!

    Thread Starter v2006

    (@v2006)

    I see all of these

    Current databases
    connection strings

    Select the user and the database, set the privileges (ALL is fine) and then hit Add User To Database.

    Did this step also.

    It’s got me stumped also since I’ve installed many before.

    Anything else I can check?

    Damn!

    This is extreme, but I think it’s gotta be done just to eliminate the possibility.

    Delete the blog, delete the database and start again. Recreate the DB and re-upload the wp software and re-try the install.

    Thread Starter v2006

    (@v2006)

    Do I need to remove all WP files from the server also
    or just recreate the database?

    I would get rid of the lot, it’s not that much and will then ensure that all the files are correct when you re-upload them.

    Thread Starter v2006

    (@v2006)

    I received the same after reinstallation of db and uploading WP files.

    Any idea why?

    Thanks

    None at all I’m afraid, I am officially stumped.

Viewing 15 replies - 1 through 15 (of 16 total)

The topic ‘unable to run install script-please help!’ is closed to new replies.