Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist:
Grab your free 10-Point WP Security Checklist:
Error establishing database connection is a very common error that I bet every WordPress user has encountered at some point. Luckily the fix is very easy and there are two ways to fix it.
Nearly every time this error is caused by incorrect or incomplete database information in your wp-config.php file or no linking the database user to the database.
Let’s tackle the first one first.
Incorrect or incomplete database information in your wp-config.php
All you have to do here is double check your MySQL database name, database username and the database user password. Make sure the credentials you have in the wp-config.php match exactly to the ones you created.
If you’re not sure where to find the ones you created, log into your cPanel account.
Then click on MySQL databases. That will show you all the database in your hosting account. Find the correct on for the wp-config.php file you’re working on. Make sure the db name matches what’s in the file.
Then find the db username you have linked to that database and what’s in the wp-config.php file matches exactly what’s associated with your database.
If you don’t remember the password, or have it noted somewhere, you can generated a new password for the user and put that into the wp-config.php.
While you’re here, you can make sure that the second possible reason for the error is taken care of.
At the bottom of the MySQL database page you will be able to link the database user to the database. Make sure they are linked and the correct privileges are set. If you’re unsure of the proper privileges, choose them all.
Now save the db user to database association. Save the wp-config.php file you were updating.
Then go to the page that was generating the error establishing database connection error and reload that page. Everything should be working normally now.
I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.
————–
If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.
Connect with us:
WP Learning Lab Channel:
Facebook:
Twitter:
Google Plus:
Pinterest:
Nguồn: https://madisonrep.org
Xem thêm bài viết khác: https://madisonrep.org/cong-nghe
Thanks!! This video makes my day happier
Thank you soo much sir my problem has been sole….
I did this with a subdomain but it still doesnt work 🙁
Huge help, Thank you
Thank you so much. It worked!
thank you boss!!!
Thank you. Very much
Thanks. You solved my issue 🙂
I updated my WordPress and apparently my database was deleted :S Is there a solution? I don't know if there's a way to create again the database or something, I don't have a backup of it, so perhaps I'm screwed. Your videos always have save me, thanks so much for this content!
Thank you, it works. I'm using localhost and was unable to create a database. this video helps me
Thanks from Brazil!!!
thank you bro…
Thank you 🙂
I noticed that everytime i try to add or edit something on my website, it gets cut off and then i get this error message, it useually disappears in a while, but it wastes a lot of time because i have to wait until i can use my website again , really boring.
I'm running localhost with this same issue. Went to the database and did like you instructed and it works. Thank you so much. I didn't experience this issue with the same setup on other machines.
Thanks, this video fixed my day!
Hi, When I install wp rocket speed up plugin into the WordPress & save changes, then it shows this database error. any reason for that, I am wired now. pls, help.
thanks a lot! Worked perfectly
ty!
Thanks
I am really worried my website was completely normal I haven't worked on this for many days, but yesterday I open and it was normal. Today I got the error 408 timeout request and then later "Error establishing a database connection". Then later open normally. I check and I have this database username(like on your video). Can this happen again? I am worried because this site is for a client and he bought his hosting with a third company that doesn't give me full access to the admin panel, probably because they have many websites there. Just weird.
hello sir
actually I was used wordpress database reset after that it's showing
""""""""Error establishing a database connection
If your site does not display, please contact the owner of this network. If you are the owner of this network please check that MySQL is running properly and all tables are error free.
Could not find site www.xxxxxxxxxx.info. Searched for table wp_blogs in database i5368684_wp1. Is that right?
What do I do now? Read the bug report page. Some of the guidelines there may help you figure out what went wrong. If you’re still stuck with this message, then check that your database contains the following tables:
wp_users
wp_usermeta
wp_blogs
wp_signups
wp_site
wp_sitemeta
wp_registration_log
wp_blog_versions"""""""
What can I do now????????????
Please help me
Thanks !! Really helpful !!
Hello, can you help me to fix this error? /wp-includes/class-wp-hook.php on line 286. thank you in advance
Thanks so much, i spent the last 4 hours trying to fix this until you came my way
not working for me
Did not work 5/3/2018
I've found some of your videos useful, but this one – Sorry, but this is not clear. The explanation of exactly how to select he correct database from many in a list, and then add a new user and password, and then tie that user & password to the wp-config.php file, was not made clear. In fact it seemed like you edited the video and cut out your voice for a second right when you were explaining how to add a new user.
I have a older 2015 copy of my GoDaddy WP website which I'm trying to load into a new GoDaddy hosting account now, and although I followed all your well explained steps in your very good video on how to manually upload /reinstall a WP website, I still can't get the old site to link into the new installation of WordPress. I'll keep looking for a solution.
How do I get to the CPanel? Please I need HELP! I'm getting an error message saying, Error establishing a database connection
How do i get cpanel
sir please help me i sent my wordpress acount please recover it
bro iam using 000webhost but my sql isnt seen plz fix
Thank you very much!!
Thank you, you're amazing!
Keep it up.
Awesome!
I've already did this, and also i have a correct setup wp-config. .but still came up with this error..
I still call it the white screen of death 😛 ANW thank you very much
I realized my problem. I got a zip file from previous designer and realized he used long address(?) like http://….. instead of simply page name. So, it screws up everything on localhost. Is there any quick way to fix this ?
Wow. You saved me. Somehow, my problem isn't yet gone, but got me a step closer. I was about to quit this job. Thank you !!!!
Bjorn,
You don't know how you saved me. I can't thank you enough.
Hello
Actually in my sql database it is showing
Create New Database
Current Databases
MySQL Users
Add New User
how to solve the issue
Sir Help Me Please
My Website Hqpoint.org get 5-10 times Error 502 Bad Gateway in a day after installing any plugin .^_^;
please give me solution😅😅😅😅
sir when I apply these settings nothing happens. error not fixed
how to do this thing in AWS pls can u upload a video
You're the shit!!
Thanks for uploading!
I want to kiss you(no homo) lol thx
WOW works like a charm with just one click. the error occured after i deleted the contact form7 plugin from wordpress dashboard. still wondering why this happened. Pleaselet me know if u have any idea. Thanks
brother i m using xampp localhost .. so my problem is I have copied my whole wordpress website folder from ftp server to Xampp localhost .. it is showing the same error . what should i do now .