How to Fix the Error Establishing a Database Connection in WordPress

How to Fix the Error Establishing a Database Connection in WordPress


How to Fix the Error Establishing a Database Connection in WordPress

In this video you will see How To Fix Error Establishing A Database Connection in few clicks. As you know wordpress is very easy CMS you can do lot of things with your website. This is one of the major error which user always get it and sometime wordpress users do know how to fix this error.

#WordPress #WordPressTutorial #WordPressTips

So the video and learn how to fix Establishing A Database Connection error


For more wordpress videos click on this link - https://bit.ly/3cMald8




Please like this video. It will motivate us.


Please subscribe our channel for good content.

How To Fix Error Establishing A Database Connection

To know the full steps please watch video till the end or like and share with your friends.

If you like this video Make sure to subscribe and click the notification button, so you never miss our new videos.

Suggestion — If you are going to make any changes please take backup of your website in order to avoid glitch.


Content

0.03 -> hello guys in this video tutorial we're going to  be learning how to fix the error establishing a  
8.31 -> database connection error on WordPress website so  basically these two main causes of this issue the  
15.45 -> first one has to is wrong database credentials  and second has to do it's a corrupt WordPress  
20.97 -> database so I'm going to walk you through how  to fix either scenarios so we start the first  
27.39 -> one which is when you have corrupts database so to  fix that you go to your cPanel where the website  
38.76 -> is being hosted you go to your file manager over  here okay then you locate your the folder for your  
51.09 -> domain then inside the folder you look for the OBP  config dot PHP I'd suggest downloading this first  
62.16 -> before editing in case you run into an issue and  you need to revert it back so after downloading  
70.02 -> click click and click on edit so it takes a while  okay and you click on edit here now this file is  
85.23 -> responsible for your database configuration  so see inside the top part here we have our  
90.42 -> MySQL credentials so to fix a database the core  database you go to the last line over here and  
99.9 -> you add in this code the fine we P allow prepare  so I have this also have this in my zip file here  
109.05 -> sunder gets copied just for illustration purpose  copy this and I'll go to the bottom I'll paste  
116.16 -> it so the fine weepy allow repair true so what  press has are to the hell that repairs corrupt  
124.08 -> at the basis automatically so you click on Save  Changes over here so I've not really made any  
131.28 -> change because this was ready here so when you  click on say change is going to save a change so  
136.91 -> what you do next is you have to visit this URL so  I'm going to copy this okay so I'm going to paste  
151.07 -> this over here and this is what my domain name  so I'm going to copy this so what you do is you  
160.28 -> replace www dot your site that come with this here  your main domain name so it's going to be your  
170.96 -> main domain name would be add me mayn't repair  that PHP so you click enter it's going to take  
178.79 -> you to this page so at this page you can click  repair database or repair and automate database  
184.67 -> either of these two options will fix the issue  but this would take a little bit more time and  
190.67 -> it's going to optimize your database as an extra  so that's basically how you fix this issue if it  
198.2 -> was caused by a corrupt database so we're going  to go over how you'd fix this if it was caused  
204.62 -> by a wrong password or wrong database credentials  so go back to our wiki config file over here okay  
215.21 -> I'm forgot to mention something after you click on  repair database here you go back to your whippey  
221.24 -> config and you remove this line from your file  because anybody can assess this on your website  
229.7 -> so it's not really secure so it immediately  you're done repair your database you remove  
236.63 -> this line from your weepy config file okay moving  on so I'm just going to add a few extra dots to  
249.56 -> this MySQL database password just illustrate  the error so click on save so refresh this
258.95 -> so as you can see we have the error if  I remove this and I save changes and I  
272.6 -> go back as you can see it's working so if you  have wrong credentials over here any of these  
281.81 -> conditions with your own your sites is going  to have that error so the first thing I want  
287.42 -> you to notice make sure to always make sure your  MySQL host name is localhost okay because most  
294.98 -> hosting companies the the host name you uses  localhost so some companies don't use localhost  
301.46 -> they have another name for the default hostname  so if local if you try everything and doesn't  
309.14 -> work any to contact support and ask them what's  their default hostname is this normally occurs  
315.62 -> when you're moving from one hosting company  to another where they have a different host  
321.89 -> name so but by default most host name use  local hosts so this would be the last thing  
328.64 -> you consider so I'm just going to go over this  to how to make sure your database name database  
335.63 -> user name and database password is correct so  you'll have this so to do this we have to go  
343.13 -> back to our cPanel then you scroll down and you  look for my SQL database so you click on this  
353 -> and okay when you get here you go over to your  current databases so you can see I have a lot  
363.44 -> of database off to page 10 so I'm just going  to search for the database so the database  
369.5 -> name here as a success vp40 9 so I'm going to  copy this and I'm going to paste it over here  
378.95 -> now paste I'll click on go so this is going  to search for this exact database for me so  
386.96 -> go down and see and see this is a database and  this is the user then is assigned to it so if  
393.89 -> you check here this user must be exactly this  user here so they must correspond so we would  
401.36 -> confirm this we've performed this so we need  to confirm the password so I which I'm going  
408.83 -> to go down so we already have this I'm username  AIESEC f vp40 9 so you just go down and you look  
419.6 -> for your current users so as you can see this  is the user here so in order to make sure this  
424.76 -> password is the correct password or to make sure  this password is correct we'd go over here and we  
432.89 -> just change the password to something different so  it would be very very sure that okay that password  
439.13 -> is correct so would type in any password here so  let me just type in something okay the e for 5p
461.08 -> the one two three four five okay so I'm going  to change this password now so once you change  
471.52 -> this you come back here so I all I did was just  add five to the password here so as you can see  
478.96 -> this trick yourself should be correct so then  click on save and you go back to your blog and  
487.33 -> your fresh that it still works so that is  basically how we'd fix this issue and you  
497.95 -> only consider this host name when you try it  out you show that these three conditions are  
504.43 -> correct then you can contact your host and  tell them ask them for the correct host name  
509.17 -> and if all this does not work then you just  have to contact your hosts and tell them to  
515.44 -> fix the issue for you so I hope this video  is helpful and solve the issue for you if  
521.68 -> you have to like to support the channel click  subscribe and you can like the video also so

Source: https://www.youtube.com/watch?v=crECnRPHhdo