🛠️ Fix Error Establishing a Database Connection in WordPress 💻

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 54

  • @marikakusnire1264
    @marikakusnire1264 5 місяців тому

    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  5 місяців тому

      Glad to hear our guide could help! :)

  • @migui.hendrix
    @migui.hendrix Рік тому

    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  Рік тому

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

  • @francohanekom7510
    @francohanekom7510 Рік тому

    @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  Рік тому +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.

  • @abdelazizbelal97
    @abdelazizbelal97 9 місяців тому

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

    • @wpbeginner
      @wpbeginner  9 місяців тому +1

      Glad our guide could help :)

  • @recep.kandemir
    @recep.kandemir 9 місяців тому

    Excellent information. Thank you for help

    • @wpbeginner
      @wpbeginner  9 місяців тому

      Glad it was helpful!

  • @jeanythebrain1631
    @jeanythebrain1631 Рік тому

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

  • @YTP-jp9lj
    @YTP-jp9lj Рік тому

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

  • @vacuummorph
    @vacuummorph 11 місяців тому

    you saved my life, thank you!

    • @wpbeginner
      @wpbeginner  11 місяців тому

      Glad we could help!

  • @premparikh6035
    @premparikh6035 Рік тому

    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  Рік тому

      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 Рік тому

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

  • @mariusmanlive
    @mariusmanlive Рік тому

    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  Рік тому

      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.

  • @edburckhardt2234
    @edburckhardt2234 Рік тому

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

  • @thecozyconstellation
    @thecozyconstellation 2 роки тому

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

    • @wpbeginner
      @wpbeginner  2 роки тому

      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/

  • @Isixhubio7
    @Isixhubio7 2 роки тому

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

    • @wpbeginner
      @wpbeginner  2 роки тому +1

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

    • @Isixhubio7
      @Isixhubio7 2 роки тому

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

  • @sajid1264
    @sajid1264 Рік тому

    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  Рік тому

      Thanks for sharing this for those running into that issue!

    • @SM-nq1ys
      @SM-nq1ys 9 місяців тому

      This saved me. Thank you 🙏

  • @hasanalmazoory6569
    @hasanalmazoory6569 2 роки тому

    Thank you so much! Option 2 fixed my issue.

  • @aperson1181
    @aperson1181 9 місяців тому

    how do I upload the changed wp_config?

    • @wpbeginner
      @wpbeginner  8 місяців тому +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 8 місяців тому

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

  • @DanieladelSol
    @DanieladelSol 2 роки тому

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

  • @alvincrosse7874
    @alvincrosse7874 Рік тому

    Thank you!

  • @miradevi1454
    @miradevi1454 2 роки тому +1

    Commection is written on thumbnail instead of connection

    • @wpbeginner
      @wpbeginner  2 роки тому

      Thank you for letting us know :)

  • @sfisothecreative99
    @sfisothecreative99 Місяць тому

    This helped

    • @wpbeginner
      @wpbeginner  Місяць тому

      Glad our video was helpful! :)

  • @БукетХаджиева
    @БукетХаджиева 10 місяців тому

    link not working

    • @wpbeginner
      @wpbeginner  10 місяців тому

      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/

  • @sampesti7806
    @sampesti7806 Рік тому

    thank you thank you

  • @mrpbphoto3614
    @mrpbphoto3614 Рік тому

    nothing of this works stay same problem

    • @wpbeginner
      @wpbeginner  Рік тому

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

  • @muhammadarslanmaqsood158
    @muhammadarslanmaqsood158 2 роки тому

    First viewer❤️

  • @miradevi1454
    @miradevi1454 2 роки тому

    please make video in hindi

    • @wpbeginner
      @wpbeginner  2 роки тому

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