Most of the time this is wrong information in wp-config.php.
Your database server could be down.
You database user doesn’t have the correct privileges to the database.
Thread Starter
pg
(@dethredic)
my database has all privileges.
I have wordpress installed, on 1 domain already. This is the second domain I am trying to get working with wordpress. The first domain is up, and I have copied the wp-config (except the database/pass/user). I even tried making another user within the same database.
Did you ADD the user to the database? Quite often that step is left out…
There are 2 error messages… which one do you get?
Thread Starter
pg
(@dethredic)
WordPress
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.
Thread Starter
pg
(@dethredic)
I tried deleting all the files, and re – uploading them, but that doesn’t hlep
No, deleting files doesn’t help when you have wrong data in the wp-config file.
Is this second domain on the same host as the one you succeeded to install?
Well, I am running out of ideas… but I have to tell you that in 99% of the cases, despite the user’s insistence on “everything being correct” – it is a human error, like typo, wrong quote, lower/uppercase, space between the quote and the info etc.
Thread Starter
pg
(@dethredic)
I wish it was like that. But I feel I have tried so many possibilities that I can’t have been wrong all of them.
Also a fact to note, as it is a secondary domain, it is located in http://www.firstdomain.com/www.seconddomain.com
Could that make a difference?
firstdomain.com is working
seconddomain.com isn’t.
I think I will just copy the info from the wp-config from my working one, into my non working one, and technically it should have the same posts and stuff right?
Also, I haven’t run the install script yet, but I don’t think that should matter because it is one of the last steps in the quick 5 min install.
I think I will just copy the info from the wp-config from my working one, into my non working one, and technically it should have the same posts and stuff right?
NEVER DO THAT!
but you may try using the same wp-config file if you change the table prefix in it (default is wp_ – make it something else)
p.s. I don’t know what the secondary domains are, sorry.
A domain is a domain. Period.
And I can’t imagine an URL as you posted!
Thread Starter
pg
(@dethredic)
Well, you can access my site via http://www.seconddomain.com, but the way the file manager is set up, it is in the firstdomain.com