How To Fix “Error Establishing A Database Connection” In WordPress

  Рет қаралды 276,713

Elegant Themes

Elegant Themes

Күн бұрын

Пікірлер: 213
@learningsolutionsgroup
@learningsolutionsgroup Жыл бұрын
Thank you, I was able to repair my database and get my site back online using your tutorial
@bravesolani1320
@bravesolani1320 Жыл бұрын
Thanks Bro... First Option didn't work but the second worked instantly. Great Tutorial, straight to the point... Sweet.
@muriukified
@muriukified 4 жыл бұрын
This a good brief video to the point. Only thing is PDO connection seems to be the standard now as Mysqli is deprecated in most hosts. Also line2 of test code has a typo: $test Connection should be $testConnection. In my case, everything was set up ok but didn't work. I had to create a new user and assign to the database for WordPress to work. Then I deleted the old user. Always try that before trying to repair the database.
@philtaylor3098
@philtaylor3098 6 жыл бұрын
This video makes too many assumptions. In my case I've only just created a DB so it can't be incorrect and there is no corruption because there's nothing in ( no tables ), I've copied and pasted the username and password so I know they're correct and yet wordpress still gives me the message "Error Establishing A Database Connection"
@ed101poti
@ed101poti 5 жыл бұрын
did you manage to fix it? i'm having this same annoying issue for some time now and can't seem to find an answer. a fresh install and still an error in connecting to the database which is on localhost...
@ProGamer-ho7lz
@ProGamer-ho7lz 4 жыл бұрын
this message annoys me do you know how to stop it and fix
@muriukified
@muriukified 4 жыл бұрын
@@ed101poti Always test with a fresh new user with all privileges
@marcchami8851
@marcchami8851 4 жыл бұрын
Did anyone figure this out? helppp
@awfulname7610
@awfulname7610 4 жыл бұрын
Same issue, anyone found the solution?
@redirajahdielrosario3645
@redirajahdielrosario3645 2 жыл бұрын
THANK YOU SO MUCH! IT WORKED! I modifed my SQL database and that error popped up after the update! THANK YOU AGAIN!!!!
@kamalhines
@kamalhines 2 жыл бұрын
OMG thank you so much problem fixed with the first option,,,, you are genius among men.
@godlabelfoundation
@godlabelfoundation 2 жыл бұрын
This helped me to address my issue. i had previously changed my cpanel name and this changed the username of all my databases. so i logged in to my cpanel, root directory of my website and edited the wp config file and put the correct username of my databases. i first checked the username of my databases using the cpanel file manager.
@1gk
@1gk 3 жыл бұрын
Thank you!!! Learning about the wp_options table in the database was a lifesaver for me.
@elegantthemes
@elegantthemes 3 жыл бұрын
Nice! Glad to hear it helped 👍
@tomislav_._9224
@tomislav_._9224 Жыл бұрын
Thank you, this tutorial saved my nerves and brought my site back to life! :)
@chaoSefat
@chaoSefat 4 жыл бұрын
I don't have wp-config.php not even in the zip I downloaded from WordPress.org
@mhpreach
@mhpreach Жыл бұрын
What I need to know is what directory the sql file goes in on the server. I’m having to migrate my word press site manually. Due to upload file size limit. What directory contains the SQL file?
@jordan17bliss
@jordan17bliss 5 жыл бұрын
Thanks for the fix! Editing the wp-config.php file was exactly what I had to do. Working great now. Life saver.
@nazimbelli937
@nazimbelli937 3 жыл бұрын
Any help pls, im using vultr vps server and i faced this issue and i cant repair it im confused , should i connect my server with FTP like filezilla or i should enter to that by PUTTY .PLS ANYONE CAN HELP .THANKS IN ADVANCE
@tarjumanemughal7843
@tarjumanemughal7843 Ай бұрын
how you edit this, my FTP said it's read only... my hosting is from godaddy kindly help
@Ax4k
@Ax4k 3 жыл бұрын
I get big traffic spike, I get this error, but server was up. so what should I do in this case? it comes for some time, then the site working. you give solution for 1 and 2. What about 3?
@cinemaofsounds
@cinemaofsounds Жыл бұрын
I didn't give my new database privileges and the MySQL databases allowed me to do that thank you.
@LoopcrateAudio
@LoopcrateAudio 3 жыл бұрын
Thank you SOOO MUCH for this! Was freaking out after trying to fix it for hours and this worked like a charm! 👍🏼
@modz9711
@modz9711 2 жыл бұрын
Hey thanks for video tips, But I have an issue when I go to the phpnyadmin and navigate to the wp-options of the current database I'm not able to see the site url instead there's something else. What could be the reason for this ? Thanks in advance.
@jonthemachine1970
@jonthemachine1970 8 ай бұрын
2:16 lost me. Thanks for showing us how smart you are.
@alextrd7951
@alextrd7951 4 жыл бұрын
my site is hosted on AWS and i searched the mysql folder via filezila but couldn't find that file which contains database name and other credential. do you have any documentation for AWS or is there any specific name of that file ?
@ilhanhassan7941
@ilhanhassan7941 4 жыл бұрын
I have a question if I’m on a website and error establishing data connection it it something on my side or should I just wait for the website to fix itself
@ОлегМихайлов-к2щ5э
@ОлегМихайлов-к2щ5э 3 жыл бұрын
I have just restarted my server and the website works well now!
@vladimierapostol5959
@vladimierapostol5959 Жыл бұрын
The site was doing fine until "Error establishing a database connection" appeared in rare occasion the site could be accessed sometimes not is it the site problem?
@GSapStark
@GSapStark Жыл бұрын
what if I can't find the wp-config file in phpmyadmin ? it's nowhere to be found and I can't go forward with troubleshooting :(
@patorjk
@patorjk 5 жыл бұрын
Dude, you are freaking amazing!! I had a user to my site email me about getting this when the search functionality was used. I noticed it also appearing for other spots on my WordPress blog too. I emailed support, but got no response. I figured since it was almost Christmas I'd be SOL. However, after trying your test-connection code, I was able to get an idea of what was wrong and fix the issue. Anyway, thanks for making this video!
@nj5195
@nj5195 4 жыл бұрын
A few days ago i click on ''empty'' on wp_option in phpmyadmin.. Now i don't have siteurl and home in phpmyadmin. I checked everything and try with wp allow repair, but when I remove this code, again is the same ''Error Establishing A Database Connection'' I try to add a new user, and update wp-config, still the same. I make this testconenction.php and when i start it says: Connection successfully. Debug log is ''mysqli_real_connect(): (28000/1045): Access denied for user '****''localhost' (using password: YES) in /home//wp-includes/wp-db.php on line 1635
@d4gameplay317
@d4gameplay317 3 жыл бұрын
Amazing! I had troubles with this after moving hosts and the repair code (and repairing database) worked perfectly. Thanks so much!
@thetechguy47
@thetechguy47 3 жыл бұрын
the same here
@simersingh9927
@simersingh9927 4 жыл бұрын
actually i am new to wordpress my database connection is not established via wordpress.org showing some connectivity error and i also not having config.php file its config-sample.php what should i do things i have tried making other user to the database and give previliges but same error message is shown and with installation of wamp server i got marinedb as well
@Techbox1985
@Techbox1985 4 жыл бұрын
okay and what if nothing of this 3 fixes helps? sql server are the same as webserver (other programs has access) the username and passwords are right (used copy paste! and trible checked this) corrupted database? how the table WP_database is empty ! so now how to fix? the maria-db_error.log has no rejection request errors logged. :s
@PetersonCharlesMONSTAH
@PetersonCharlesMONSTAH 12 сағат бұрын
I didn't get the option to choose anything it still shows me error establishing a database connection
@Ghaleon
@Ghaleon 4 жыл бұрын
I'm trying to run my wordpress in localhost so I can make a few changes and upload again via FTP. But when I downloaded the files I'm receiving this error because I don't have that database. How may I get the wordpress database and have it locally?
@guyeeeee
@guyeeeee 6 жыл бұрын
Thank you! Had this for 2 days, had to create a new user name as you show and now it works.
@robgarza6591
@robgarza6591 4 жыл бұрын
This video indirectly helped me solve my problem. The issue was with the config.php file. Thanks!
@saajidhnawwar8505
@saajidhnawwar8505 3 жыл бұрын
theres no file called wp-config.php instead only wp-config-sample.php is available. where can i find it?
@JamesNdungu1
@JamesNdungu1 2 жыл бұрын
Mine was a simple WordPress PHP thing repair. Thank you, solved my problem :)
@piachitasji5846
@piachitasji5846 4 жыл бұрын
Thank you for this tuto. So I can't connect me to the database. After did every steps, the error still appears :'( I made it with WAMP, maybe do you think 'll be different with XAMPP ? Thank you so much
@jordanrollicks1289
@jordanrollicks1289 4 жыл бұрын
I didn't understand where to create a new file, help me plz
@tapiwanashejamielkazembe2346
@tapiwanashejamielkazembe2346 Жыл бұрын
You are soo good, thanks a million times buddie.
@PraveenKumar-ts2ok
@PraveenKumar-ts2ok 5 жыл бұрын
how to access wp-config.php file? I am not even able to login into admin. and FTP. it gave me an error "Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb" not even to able login wp-admin. it showing the same error esablishing a database connection error to me. i am using goggie host provider hosting account they haven't given me any answer. can you help me .
@topuinternationallimited7214
@topuinternationallimited7214 3 жыл бұрын
Many thanks, when i fix it, i solved the problem, thanks guys
@skalo1840
@skalo1840 4 жыл бұрын
i really dont know what my host is cause i dont know anything about this,but is this just for website owners btw i have the same problem
@JenniferVerdin
@JenniferVerdin 6 жыл бұрын
Thank you!! Your video helped me fix my issues even tech support from my hosting company couldn't fix :) appreciate it!
@aritora778
@aritora778 3 жыл бұрын
Thanks a lot. You are a life savior.. and job savior too!
@nazimbelli937
@nazimbelli937 3 жыл бұрын
Any help pls, im using vultr vps server and i faced this issue and i cant repair it im confused , should i connect my server with FTP like filezilla or i should enter to that by PUTTY .PLS ANYONE CAN HELP .THANKS IN ADVANCE
@leonkambarami8091
@leonkambarami8091 2 жыл бұрын
Thanks first option worked. U r legend
@arjunmpgupta
@arjunmpgupta 4 жыл бұрын
Hi even after pasting code in wp-config file, this site repair page is not working
@kindahall
@kindahall 4 жыл бұрын
same
@lgds.gaming8385
@lgds.gaming8385 2 жыл бұрын
where can i find wp directory ?
@CarlosDiazChico
@CarlosDiazChico 5 жыл бұрын
Hola!!..When I tried to access the ftp file, I got this message: Under Construction The site you were trying to reach does not currently have a default page. It may be in the process of being upgraded. Please help!!
@SaifZiya
@SaifZiya 6 жыл бұрын
I've started getting this error after upgrading my VPS (1 GB) plan to VPS (2 GB) plan. On VPS (1 GB), my website was getting around 500 users at the same time (working fine). But, after switching to VPS (2 GB), it could only handle 2 to 3 hundred users. Any idea what the problem is?
@paprika8177
@paprika8177 4 жыл бұрын
The testconnection.php only shows a blank page, nothing else... HELP!
@brokegirl123
@brokegirl123 4 жыл бұрын
After add new database I dont have any option like add a new user ..
@gustavofarianascimento2959
@gustavofarianascimento2959 3 жыл бұрын
Data base repair works for me! Thank you!
@Qamre_Alam
@Qamre_Alam 4 жыл бұрын
I am really very grateful to you bro... Heartily thanks from India...
@homeiscool1019
@homeiscool1019 4 жыл бұрын
checked the msql, it says it is offline. does it mean that the problem is w/ my web hosting? how d i fix it?
@helpwp-wordpresstutorials1741
@helpwp-wordpresstutorials1741 4 жыл бұрын
kzbin.info/www/bejne/maOodKGIha2bmtE
@balajeemishra
@balajeemishra 3 жыл бұрын
Someone please help me..I am unable to resolve my error..I have tried everymethod nothing seems to work in my case.
@yourdailyfails1
@yourdailyfails1 4 жыл бұрын
i deleted my mysql database of wordpress how can i remove it. or recreate database
@FemaleTraderRamya
@FemaleTraderRamya 2 жыл бұрын
Great explanation for non-techies 👍
@EmileJobity
@EmileJobity 4 жыл бұрын
Line 2: @4:34 should be $testConnection
@emsa8090
@emsa8090 4 жыл бұрын
how can I fix it when i'm trying to get on the website through my phone and it shows the error?
@sylvestersmyles-crentsil5758
@sylvestersmyles-crentsil5758 2 жыл бұрын
Thanks man, really needed this.
@helenmendoza5956
@helenmendoza5956 3 жыл бұрын
can i just say you are the best?!!!!!
@kuismakansala7666
@kuismakansala7666 4 жыл бұрын
The thing is I don't own the site and I don't have those wp-xxx.php files.
@garrin5922
@garrin5922 4 жыл бұрын
my problem is... this error is came out when I am installing wordpress locally
@Groooovs
@Groooovs 4 жыл бұрын
You saved my life my man! Thanks
@elegantthemes
@elegantthemes 4 жыл бұрын
You're welcome Manu! 😄
@webdesigncfgromania579
@webdesigncfgromania579 2 жыл бұрын
Hi. I was able to restore the database. Very good information. Thanks!
@dasd.bilany
@dasd.bilany 3 жыл бұрын
It still says error to establishing connection for reference exactly what i did ___________________________Code Asked to put inside________________________ (note into php.config) define ( 'WP_ALLOW_REPAIR', true ); after i put the code in i went to the website and did mywebsite/wp-admin/maint/repair.php ________________________________________Results_____________________________________ Same error word per word Error establishing a database connection __________________________Code i had at very start____________________________ (Note i did not erase any data only simply added what was told)
@CK__NATH
@CK__NATH 4 жыл бұрын
Sir l m from lndia, Sir pls help me l have same problm ,..my site not oppening
@tanusreebanik1993
@tanusreebanik1993 3 жыл бұрын
Can anyone tell me how do I get this php my admin panel?
@3-dog-solution
@3-dog-solution 5 жыл бұрын
Hi chaps, .. I still haven't sorted out my localhost XAMPP issue, but a few things have poped up when trying out the above examples. Firstly: PHP v5.5.0 scrapped, or depreciated the mysql_connect() function, and it seems that PHP 7 hasn't got the equivalent, .. I call that bullcrap. After a lot of precious precocious digging: mainly coming off of the many precocious precious programmers out there, all humming and arring as they are wont do; then I've discovered that mysql (i) can be used instead. Note the [ i ] in the new function, and you can forget all that confusing blurb that goes on about PDO-functions, especially if all you want to do is test the bloomin' thing. Also: the example shown in connecting to your database was -- $test Connection, -- when in fact it's $testConnection -- (no space.) Here's the code, .. Running it tells me that I can connect to my database, but I still can't get XAMPP to load my web-pages. Note: not a *new* install, .. it was working fine last night, .. then it wasn't today. My journey continues .. hope the above helps.
@joshuajackson7941
@joshuajackson7941 4 жыл бұрын
Thanks a lot. U help me a lot!!! I'm a beginner
@duderz6876
@duderz6876 5 жыл бұрын
I Dont get it, I Got the error on Xbox one downloading minecraft mods, Its not my website Annnnnnddddddd i got no pc
@digitaldealsshop
@digitaldealsshop 5 жыл бұрын
Thank you so much! This happened to me today and I followed your instructions and all is good now! Again, thanks! Great video!
@marufhossain794
@marufhossain794 4 жыл бұрын
Hi, i Don undrestand his english, will you help me pls what is actually he done
@marufhossain794
@marufhossain794 4 жыл бұрын
I dont have wp-config file
@Jesus-lv9mu
@Jesus-lv9mu 4 жыл бұрын
How can you find the password, did I miss it in the video or am I just supposed to know?
@farhanahmad5934
@farhanahmad5934 4 жыл бұрын
Great video and troubleshooting tips 👍
@naderabouchakra2638
@naderabouchakra2638 4 жыл бұрын
Thank you that worked for my website
@vipergx
@vipergx 5 жыл бұрын
just in case anyone lost the wp-config file like I did. when recreating it (making sure u have the right credentials for the database inside it) set the correct permissions for it. 0600 in my (and most likely your) case. cheers
@beautifulpapillon
@beautifulpapillon 2 жыл бұрын
Thank you. It was helpful.
@spagetka99
@spagetka99 4 жыл бұрын
Thanks god for people like you. You saved my life :D
@nazimbelli937
@nazimbelli937 3 жыл бұрын
Any help pls, im using vultr vps server and i faced this issue and i cant repair it im confused , should i connect my server with FTP like filezilla or i should enter to that by PUTTY .PLS ANYONE CAN HELP .THANKS IN ADVANCE
@heartfeelings8172
@heartfeelings8172 3 жыл бұрын
i can't find code from blog post please help
@elegantthemes
@elegantthemes 3 жыл бұрын
Hi there! 👋 Please, check the lines of code here in the article: www.elegantthemes.com/blog/wordpress/fix-error-establishing-a-database-connection-in-wordpress define('WP_ALLOW_REPAIR', true); UPDATE wp_options SET option_value='examplesite.com' WHERE option_name='siteurl'
@Rockwellentrtainmnt
@Rockwellentrtainmnt 3 жыл бұрын
@@elegantthemes No you can't. Test Connection code is missing from the blog.
@helmantmc389
@helmantmc389 6 жыл бұрын
Please make a video about how to set meta description in category layout homepage in Extra. This is a big problem for a lot of people.
@qlmcoachingsuccessblueprin6119
@qlmcoachingsuccessblueprin6119 5 жыл бұрын
thanks for your help it did work as you said
@JulesIvanCGaray
@JulesIvanCGaray 2 жыл бұрын
YESSS!! Thank you so much!
@sheikhhussein6233
@sheikhhussein6233 4 жыл бұрын
Thank you so much buddy... You're a life saver
@ivofrancisco357
@ivofrancisco357 3 жыл бұрын
In case someone is using MAMP on Mac and without using a Password. The issue can be fixed by adding root as a password
@L0LIpOp
@L0LIpOp 3 жыл бұрын
Not working at all. Warning: file_put_contents(): Filename cannot be empty in C:\xampp\htdocs\wordpress\wp-load.php(2) : runtime-created function on line 1 Error establishing a database connection
@TechNow813
@TechNow813 5 жыл бұрын
Corrige seu USUÁRIO que você criou no Banco de dados do Mysql. change your USER information you created in the Mysql Database. ALTER USER ‘Usuario’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘SENHA-DO-USUÁRIO’; SEGUE O LINK das informações no site do mysql. FOLLOW THE LINK of the information on the mysql website. dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.html dev.mysql.com/doc/refman/5.7/en/native-pluggable-authentication.html
@accord93rg
@accord93rg 3 жыл бұрын
Where do I find the root ????
@djjahnotice7000
@djjahnotice7000 3 жыл бұрын
how do i edit the php file
@philtaylor3098
@philtaylor3098 6 жыл бұрын
You don't get both a wp-config-sample.php and a wp-config.php. You're instructed to edit the wp-config-sample.php. I swear you used to have edit the wp-config-sample.php file and then rename it AFTER editing to wp-config.php
@JeffDeWitt
@JeffDeWitt 4 жыл бұрын
That did it, repairing the wp-config-php file fixed my problem, thanks!
@nuradrianabintimohdyuslebi6538
@nuradrianabintimohdyuslebi6538 2 жыл бұрын
Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: NO) i keep receive this error message, anyone know what to fix
@heartfeelings8172
@heartfeelings8172 3 жыл бұрын
how can i find
@videotodvdscotland
@videotodvdscotland 3 жыл бұрын
Thanks so much for this fixed my issue
@vargabrigitta8121
@vargabrigitta8121 4 жыл бұрын
I don`t have config.php file!
@ernestofavio6735
@ernestofavio6735 4 жыл бұрын
neither do i, could you solve it?
@Mrfeezu
@Mrfeezu 3 жыл бұрын
How to fix it in android please help me
4 жыл бұрын
Thanks, worked perfectly for me!!
@abenezer3937
@abenezer3937 4 жыл бұрын
Thanks! config repair works just fine
@nzeefurqan1650
@nzeefurqan1650 4 жыл бұрын
doesnt work for me..dont know why
@haseebabdul-p3o
@haseebabdul-p3o Жыл бұрын
Thank you so much 👍
@lailaisolutions4305
@lailaisolutions4305 5 жыл бұрын
WONDERFUL VIDEO!,, THANK YOU, WORKED LIKE A CHARM!..
@ismetomerkoyuncu1179
@ismetomerkoyuncu1179 3 жыл бұрын
Thank u so much repairing worked
@ghaffarhunzai
@ghaffarhunzai 6 жыл бұрын
Dear this is a wonderful tutorial ... keep on your great work ...
@osashills1
@osashills1 3 жыл бұрын
Thank you for this informaion .
When u fight over the armrest
00:41
Adam W
Рет қаралды 19 МЛН
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 9 МЛН
Error establishing a database connection error in wordpress [SOLVED]
3:38
Converting HTML Sites to WordPress Sites
7:34
Elegant Themes
Рет қаралды 462 М.
You Won’t Believe What Excel’s Copilot Can Do! (new updates)
10:37
Divi 5 Waves Goodbye To Shortcodes. Here’s Why It Matters
2:30
Elegant Themes
Рет қаралды 1,6 М.
How to Fix the Error Establishing a Database Connection in WordPress
3:01
WPBeginner - WordPress Tutorials
Рет қаралды 181 М.
How To Customize The Style Of Contact Form 7 To Match Your Website
5:07
AMD Ryzen 7 9800X3D Review - Hail to the Chief
19:57
KitGuruTech
Рет қаралды 34 М.
FIXED 500 Internal Server Error on WordPress
9:03
WordPress Tutorials - WPLearningLab
Рет қаралды 283 М.
How To Increase The WordPress Upload Limit
6:12
Elegant Themes
Рет қаралды 66 М.