• I have installed wordpress on my domain eg. blog.xyz.co , it showing “Error establishing a database connection” , i observed database in unable to connect my host although i have checked all the parameters in the wp-config. and the same wp-config in working fine on my local IIS IP with same database. I am using SQL server as my database.
    Please help me. as i am new in PHP and WordPress

Viewing 13 replies - 1 through 13 (of 13 total)
  • Anonymous User 14379775

    (@anonymized-14379775)

    they may have prefixes that you didn’t notice

    For me, this part stands out…

    and the same wp-config in working fine on my local IIS IP with same database.

    If the database is accessable from one server, but not another, it normally means that the database server is blocking the other server. Normally it’s firewall or connection rules that won’t allow the connection.

    Thread Starter anish9970

    (@anish9970)

    i dont think firewall wont allow the connection because some other web sites also hosted on the same server using that same sql server as database.

    Then there’s something wrong with the settings in your wp-config.php file. The only thing left that coudl be an issue is the seting for the hostname, as that can have some issues (using localhost instead of 127.0.0.1, etc).

    Thread Starter anish9970

    (@anish9970)

    @web2033: didnt get what u want to say .. Prefixex in the sense what.i used default prefix like wp_

    Thread Starter anish9970

    (@anish9970)

    No i have checked all the parametere’s like DB_Name ,Host_name and all. And this same wp-config.php is working fine on my local IIS with same Host_Name and everything

    Where is the database server hosted? Is it an external box, or is it on your local PC?

    Thread Starter anish9970

    (@anish9970)

    It is on local Server kind of PC .

    This is probably something that I should have seen right from the start but…

    I am using SQL server as my database.

    WordPress doesn’t work with Microsoft SQL Server. It requires MySQL. Trying to run it off anything else will result in that error.

    Thread Starter anish9970

    (@anish9970)

    yes it does work using Data abstraction.

    OK then.

    Well, seeing as how the database is hosted on your local PC, the best guess is that the server can’t access your local PC, or that the hostname is wrong.

    If it’s not that, then you need to start digging into the actual error to see why it’s occuring. This will take some coding and debugging skills on your part, but seeing as how you’ve said that nothing else is wrong, then that’s the last resort.

    I know very little about the technical end of WordPress but I have 4 websites set up that use it. Yesterday morning I received a notice that my WordPress installations had been automatically updated. Two of the four websites are now indicating this same error, and I have not edited any of them in over a week. I don’t know enough to try and figure out what caused the two to crash while the other two stayed up and running. I am working with my host to install backups from their nightly backup.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Foth: Your problem is not the same as the original poster. Please start your own post. thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.