Error Establishing Database Connection
-
Dear All I am pulling my hair out and need help. I will try and explain my perils in logical order not using the real domains.
I installed Worpress under one of my domains e.g. Mydomain1.com
My provider is oneandone so wordpress was installed directly from my control panel and all worked fine. It asked me to create my database and username etc. I installed a theme and everything worked fine. This was using an old domain I had and used for testing. I then dicided that I wanted to move the site to one of my new domains e.g. Mydomain2.com which is actually part of the same hosting package as mydomain1. So I followed all the procedures on the wordpress site. First I did a new install of worpress under the new domain2.com. This created a second database with a new name and new login. Then I backed up all the files in the original domain1.com and I also backed up the original database (lets call it DB1) by exporting it from phpadmin panel.
I then uploaded all my backed files to the new location of mydomain2.com overwriting any files created as part of the worpress install (i think this was my mistake point). I then imported the old database into the new database i.e. DB1 (from domain1.com) to DB2 (domain2.com). I then loggedinto the wordpress admin panel and using the plug in “Backup and Replace” I replaced all occurences of the old domain1.com with the new domain2.com. This seemed to work fine.
Finally I then went and edited the old wp-config file and updated it the the new database name DB2, new database user DB2 and new database host DB2.DB.1and1.com . In the old file there the host name also had :3306 which I have tried with and without. The tricky part was the database password entry. In the old WP-config file it had a rather large string of mixed characters and I dont know where this came from. I assume it has created this automatically. Anyway I have tried leaving this the same and also changing it to the new password that was assigned to the new database when I created it.
In all cases when I save the wp-config file I end up getting the message “error establishing database connection”. This messages appears on my webpage as soon as I type in the domain2.com Also I can no longer get into my admin panel. So I think I have really screw something up but I am not sure at what step. Can someone please offer advice and corrective actions. Im a bit of a newbie so keep it simple please.
The topic ‘Error Establishing Database Connection’ is closed to new replies.