Jump to content
xisto Community
Illustrious

Error Connecting To Database [solved]

Recommended Posts

I installed wordpress on my website and I get an error when I try to access the page with my blog. I have edited the wp-config.php file accordingly but it still gives me the "Error Connecting to Database" error.

In my wp-config.php file, I have:

/** The name of the database for WordPress */define('DB_NAME', '********_databasename');/** MySQL database username */define('DB_USER', '********_user');/** MySQL database password */define('DB_PASSWORD', 'MySQLuserPass');/** MySQL hostname */define('DB_HOST', 'localhost');

I already created a user and a database for WordPress, added the user to the database and added permissions to access the database. I don't know why it is not working for me. Another site I looked at said that capitalizing the "L" in localhost might solve the problem but that did not work for me.
Edited by moderator (see edit history)

Share this post


Link to post
Share on other sites

I am not sure that's the case here, but some webhosts have a configuration where localhost does not work for a database host. In some weird cases even changing it to 127.0.0.1 which is basically the same worked.I wonder how it's sorted out here at Xisto though.

Share this post


Link to post
Share on other sites

I am not sure that's the case here, but some webhosts have a configuration where localhost does not work for a database host. In some weird cases even changing it to 127.0.0.1 which is basically the same worked.I wonder how it's sorted out here at Xisto though.

Here at Xisto it's simply localhost.

Share this post


Link to post
Share on other sites

When you're hosting on local server which you're right now because you uploaded files to this server then you've to enter 'localhost'. For network drives and multiple installation from single install you need to enter the name or IP of the host. Don't bother about it for now and just enter 'localhost'.I don't know why you're manually installing wordpress because you can install 2 update back of wordpress. Besides that most of the asta and Xisto - Web Hosting has new update for wordpress released. Now just install this upgraded from fantastico and in future upgrade from your dashboard. If you fail to upgrade from dashboard then simply install using 'wordpress automatic upgrade' plugin that is in repository.

Share this post


Link to post
Share on other sites

When you're hosting on local server which you're right now because you uploaded files to this server then you've to enter 'localhost'. For network drives and multiple installation from single install you need to enter the name or IP of the host. Don't bother about it for now and just enter 'localhost'.
I don't know why you're manually installing wordpress because you can install 2 update back of wordpress. Besides that most of the asta and Xisto - Web Hosting has new update for wordpress released. Now just install this upgraded from fantastico and in future upgrade from your dashboard.

If you fail to upgrade from dashboard then simply install using 'wordpress automatic upgrade' plugin that is in repository.


Wow. I did not know that I could install WordPress automatically. I still haven't been able to fix the "Error connecting to database" error but my blog seemed to be working perfectly after I used this method. Thanks! :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.