Error Establishing Database Connection Wordpress Ec2
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about error establishing a database connection wordpress install hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges error establishing a database connection wordpress localhost wamp Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each error establishing a database connection wordpress ubuntu other. Join them; it only takes a minute: Sign up Error establishing a database connection Amazon EC2 - after moving my wordpress blog up vote 11 down vote favorite 8 I am getting the error: "error establishing a database https://forums.aws.amazon.com/thread.jspa?threadID=115371 connection" after moving my wordpress blog to Amazon EC2. I've checked the wp-config.php file and settings are ok (localhost, password and username). I've read many of the questions and answers here but nothing helped me. I have shell access so I can check everything that you need me to do. Maybe I should look at the configuration file for phpmyadmin to see what db connection settings are there, because phpmyadmin works, but I don't know where it is. http://stackoverflow.com/questions/7315382/error-establishing-a-database-connection-amazon-ec2-after-moving-my-wordpress Thanks wordpress amazon-ec2 database-connection share|improve this question edited Sep 6 '11 at 5:50 asked Sep 6 '11 at 5:38 Idan Shechter 2,9941250117 Can you tell us where the database is configured in your wp-config.php? If it runs on localhost, did you check that mysql is running locally? If it runs on a remote host, is it reachable from your ec2 instance? Typically if the adress is a 10.x.x.x or 192.168.x.x it will probably not work ( unless you have an infrastructure setup, but you can try to ping it anyway). If it is a dns name also check you can resolve it from your ec2 instance. –OlivierS Sep 6 '11 at 6:00 I am getting here since sym linking to a different location on the server. Before it happened occasionally and that was still a worry and restarting did the trick but it isnt great and suggests mal configuration for us ec2 users IMO. –landed Jun 20 at 12:38 add a comment| 9 Answers 9 active oldest votes up vote 12 down vote accepted For me just restarting the mysqld service worked. There was a hitch though, as soon as I executed sudo service mysqld restart the MySql service stopped but didn't start. sudo services mysqld start gave a MySQL Deamon Failed to Start Error. I spent a lot of time trying to start the service but
database connection Error establishing a database connection thinhduckhoi @thinhduckhoi 8 months, 1 week ago Hi guys, Here's my problem. I use mysqldump to backup the Mysql database of WordPress from old server, then i created one new EC2 https://wordpress.org/support/topic/on-ec2-instance-error-establishing-a-database-connection/ instance,installed mysql,created new databases with new user, password and restore the backup-file into this instance. After that, i edited the wp-config.php with the new database, user,password that i just created and restored backup-file to. When accessing the address of instance, let's say 52.192.0.1/wordpress, the error said: Error establishing a database connection What should i do now? Viewing 7 replies - 1 through 7 (of 7 error establishing total) thinhduckhoi @thinhduckhoi 8 months, 1 week ago One thing that's weird is even though i deleted wp-config.php and create a new default file by use the copy command, the error still appeared. cp wp-config-sample.php wp-config.php What happend? thinhduckhoi @thinhduckhoi 8 months, 1 week ago No one know about this? catacaustic @catacaustic 8 months, 1 week ago Did you edit the wp.config.php file and enter database connection wordpress the new databases connection details in it? That error message means that you have got an incorrect value in one or more of the database fields and that's not allowing you to connect to the database server. thinhduckhoi @thinhduckhoi 8 months, 1 week ago Actually i used mysqldump to backup and move the old mysql database and then on the new server, i created a new database with new user and new password to restore in that.After that, i edited the wp-config.php file with new value and access the wordpress page at the new server's address.That's it. And i'm sure the database was OK, not broken because the content of WordPress site on old server-side is still OK. thinhduckhoi @thinhduckhoi 8 months, 1 week ago Sorry but i just moved mysql database, not html content of the old site. Could i restore the new wordpress site with just old mysql database? catacaustic @catacaustic 8 months, 1 week ago You can, but my answer is the same as before. One or more of the details (hostname, database name, usernmae, password) is not correct in your sites wp-config.php file, and that's what's causing that er