🛠️ Fix Error Establishing a Database Connection in WordPress 💻

Sdílet
Vložit
  • čas přidán 29. 08. 2024

Komentáře • 52

  • @marikakusnire1264
    @marikakusnire1264 Před 3 měsíci

    Thanks a lot! :)) This allowed me get back in WordPress admin panel. Pages weren't working, so I updated permalinks and everything now is working fine :)

    • @wpbeginner
      @wpbeginner  Před 3 měsíci

      Glad to hear our guide could help! :)

  • @miguel27codema
    @miguel27codema Před rokem

    Thank you so much! I'm doing a wp web for class and i thought i had lost it, but i realised idk why my sql user had lost the privileges!!! Thank you again :)

    • @wpbeginner
      @wpbeginner  Před rokem

      You're welcome, glad to hear our guide was helpful!

  • @abdelazizbelal97
    @abdelazizbelal97 Před 8 měsíci

    you save me a 1 month of hard hard harrrrd work 😍😍

    • @wpbeginner
      @wpbeginner  Před 7 měsíci +1

      Glad our guide could help :)

  • @jeanythebrain1631
    @jeanythebrain1631 Před rokem

    Thank you so much. You are the best. I was really close to a mental breakdown.

  • @vacuummorph
    @vacuummorph Před 9 měsíci

    you saved my life, thank you!

  • @recep.kandemir
    @recep.kandemir Před 8 měsíci

    Excellent information. Thank you for help

  • @YTP-jp9lj
    @YTP-jp9lj Před rokem

    Thank you!!! Method 1 fixed my problem!!

  • @edburckhardt2234
    @edburckhardt2234 Před rokem

    Great help, thank you for the clear and concise instructions.

  • @sajid1264
    @sajid1264 Před rokem

    Thanks, An addition to method one. if you restore your site from a backup then this error happens. After checking your WP config file and your My SQL database you need to check if you have a MySQL user assigned to your database. If not, create a user from the C panel in MySQL databases and then assign that user to that database and you're good to go.

    • @wpbeginner
      @wpbeginner  Před rokem

      Thanks for sharing this for those running into that issue!

    • @SM-nq1ys
      @SM-nq1ys Před 7 měsíci

      This saved me. Thank you 🙏

  • @hasanalmazoory6569
    @hasanalmazoory6569 Před rokem

    Thank you so much! Option 2 fixed my issue.

  • @alvincrosse7874
    @alvincrosse7874 Před 11 měsíci

    Thank you!

  • @DanieladelSol
    @DanieladelSol Před 2 lety

    This worked! Thank you so much, I was so worried! 👏👏👏👏👏👏

  • @sampesti7806
    @sampesti7806 Před rokem

    thank you thank you

  • @andromeda1903
    @andromeda1903 Před 2 lety

    can you guys make a video explaining how to make the tag and category search work? thanks

    • @wpbeginner
      @wpbeginner  Před 2 lety

      It would depend on what you're currently using but, if you're looking to improve your WordPress search then we would recommend taking a look at our list below:
      www.wpbeginner.com/showcase/12-wordpress-search-plugins-to-improve-your-site-search/

  • @francohanekom7510
    @francohanekom7510 Před rokem

    @WPBeginner - WordPress Tutorials, If I've managed to pass all of the tests in this video and my problem still persists, does it mean I might have a server resource issue?
    The site I'm managing is an ecommerce and goes down every week or so. I get the 'Error establishing a database connection', then I restart my server and everything comes back online. The server is running on 2GB Ram 1GB CPU, but I don't want to make the assumption that it's lacking resources as I don't have much server experience.

    • @wpbeginner
      @wpbeginner  Před rokem +1

      Troubleshooting from a server admin level is a bit beyond what we cover at this time. Our biggest recommendation would be to check any error logs you may have to help narrow down the root cause of the issue.

  • @miradevi1454
    @miradevi1454 Před 2 lety +1

    Commection is written on thumbnail instead of connection

  • @aperson1181
    @aperson1181 Před 7 měsíci

    how do I upload the changed wp_config?

    • @wpbeginner
      @wpbeginner  Před 7 měsíci +1

      If you used the file manager to download the file then there is an upload button at the top of the page that you would use :)

    • @aperson1181
      @aperson1181 Před 7 měsíci

      @@wpbeginner Thank you, which one is easy for beginners?

  • @mariusmanlive
    @mariusmanlive Před 11 měsíci

    Hi there 19 sep 23 , for me isn't work any solution, I try to fix automaticaly with wordpress with step 3 , after insert that line, and run , re-open xamp , clean pass , leave db with user root, is't work anyone can help me, I'm building on local host a website , any information will be appreciated please , thank you in advance !

    • @wpbeginner
      @wpbeginner  Před 11 měsíci

      If none of the methods from our guide worked for you, you could try creating a new database and connect to it to see if it is an error with the database itself.

  • @premparikh6035
    @premparikh6035 Před rokem

    Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'username'@'localhost' (using password: YES) in C:\xampp\htdocs\wordpress-6.0.3-en_CA\wordpress\testconnection.php:3 Stack trace: #0 C:\xampp\htdocs\wordpress-6.0.3-en_CA\wordpress\testconnection.php(3): mysqli_connect('localhost', 'username', 'password') #1 {main} thrown in C:\xampp\htdocs\wordpress-6.0.3-en_CA\wordpress\testconnection.php on line 3
    what does its meaning? I still getting an error.

    • @wpbeginner
      @wpbeginner  Před rokem

      From taking a look at that error, it seems like your username and password are incorrect, you would want to check that information to ensure it is set up correctly.

    • @premparikh6035
      @premparikh6035 Před rokem

      @@wpbeginner No,
      it's correct, I have already taken a screenshot.

  • @Isixhubio7
    @Isixhubio7 Před 2 lety

    What if this error occurs on localhost, and the wp site worked without problems for a while?

    • @wpbeginner
      @wpbeginner  Před 2 lety +1

      We would still recommend trying these steps for a local installation to try to solve this issue.

    • @Isixhubio7
      @Isixhubio7 Před 2 lety

      Generally great advice, but it won't work in my case!
      The Source of error was MySQL corruption(shut down unexpectedly) @WPBeginner - WordPress Tutorials

  • @muhammadarslanmaqsood158

    First viewer❤️

  • @user-lo4cy2uw9n
    @user-lo4cy2uw9n Před 9 měsíci

    link not working

    • @wpbeginner
      @wpbeginner  Před 9 měsíci

      If you mean the link to our written article then it is still working for us, you should be able to visit using:
      www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/

  • @mrpbphoto3614
    @mrpbphoto3614 Před rokem

    nothing of this works stay same problem

    • @wpbeginner
      @wpbeginner  Před rokem

      If none of our recommendations work for you, please reach out to your hosting provider and they should be able to assist!

  • @miradevi1454
    @miradevi1454 Před 2 lety

    please make video in hindi

    • @wpbeginner
      @wpbeginner  Před 2 lety

      While we do not have plans for that at the moment, we will consider it in the future