How to Fix Error Establishing a Database Connection

Поділитися
Вставка
  • Опубліковано 27 лип 2024
  • Find out how to fix the error establishing a database connection. Start your online journey with Hostinger web hosting 👉 bit.ly/3wQiGaV
    💥Use discount code HA10 to get 10% OFF!
    The error establishing a database connection is a common issue that happens when a site refuses to connect to the WordPress database. This video explains four methods to fix the error establishing a database connection.
    ____________________________________________
    📚 Get our eBooks!
    Build Your First Website in 9 Easy Steps: bit.ly/3Ce2i4V
    Speed up Your Website: 8 Practical Tips that Work: bit.ly/3F5HRsK
    ____________________________________________
    📌 Handy links
    How to Fix “Error Establishing A Database Connection” in WordPress - Hostinger Tutorial: www.hostinger.com/tutorials/w...
    What is WordPress Database - Hostinger Tutorial:
    www.hostinger.com/tutorials/w...
    WHOIS Lookup Tool: www.hostinger.com/whois
    ____________________________________________
    ⭐ Follow Us ⭐
    TikTok: / hostingeracademy
    Twitter: / hostinger
    Facebook: / hostinger
    WordPress Explained Group: / wpexplained
    Hostinger Tutorials: www.hostinger.com/tutorials
    Subscribe to our channel: ua-cam.com/users/HostingerAc...
    ____________________________________________
    🕒 Timestamps
    00:00 - Intro
    01:28 - Match the database login credentials
    02:44 - Check where your domain is pointing
    03:50 - Check your database server
    05:01 - Fix the corrupted files
    05:47 - Outro
    ____________________________________________
    The error establishing a database connection often happens after migrating a WordPress website, when it refuses to connect to the WordPress database.
    Here are some of the main reasons behind this error message:
    👉 The database login credentials are incorrect
    👉 The database server is down
    👉 Some of the core files are corrupted
    Here are four methods to fix the error establishing a database connection in WordPress:
    🟣 Match the database login credentials
    Check whether the database login settings match the ones in your wp-config.php file using your FTP client or File Manager. This video explains how to do this using hPanel.
    Edit these lines of code to match the database information:
    define('DB_NAME', 'fill_this_with_your_current_database_name');
    define('DB_USER', 'fill_this_with_your_current_username');
    define('DB_HOST', 'fill_this_with_your_current_localhost');
    🟣 Make sure your domain is pointing to your host provider
    Make sure your domain is correctly pointing to your web host. Use a WHOIS lookup tool and your hosting control panel to check the nameservers.
    🟣 Check your database server
    This error can also appear if your MySQL server is down. If the database server reaches its maximum capacity, it will not be able to handle more connections. To check your database server using PHP, find the code in our Hostinger Tutorial linked in the Handy Links section.
    🟣 Fix the corrupted files
    Check your themes and plugins to see if any of them is not working properly. If the error message showed up after you activated a new theme or plugin, we recommend deactivating and deleting it.
    ____________________________________________
    ▶ Want to see more awesome tutorials like this one in the future? Consider subscribing 😁
    ua-cam.com/users/HostingerAc...
    ▶ If you have questions, don’t hesitate and join our Facebook group for more help:
    / wpexplained
    ____________________________________________
    Thank you for watching! Let us know in the comments below if you have any questions. Good luck on your online journey. 🚀
    #errorestablishingdatabaseconnection #WordPress #HostingerAcademy

КОМЕНТАРІ • 40

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

    Start your online journey with Hostinger! 👉 bit.ly/3wQiGaV
    💥 Use the discount code HA10 to get 10% OFF!

  • @Dylson
    @Dylson 6 місяців тому

    Got it to work! Thank you so much!

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

    Thanks sooo much you're the best

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

    10000000 thank you 🙏🏻 you are angel 😍

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

    issue resolved , thanks 😃

  • @user-nl6ov8xi4m
    @user-nl6ov8xi4m Рік тому

    thank you madam

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

    One more good information

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

      I did everything but it’s not still work

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

      @@chidumebiudeze6736 contact hostinger they will help you 🔥💙

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

      @@iamkoushik21 tried every way sens last night and am still not getting any reply do you know of any better way I can contact them .?

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

      @@chidumebiudeze6736 no others way just help center and got to live chat

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

      @@iamkoushik21 where do I get the help contact.?

  • @AdekunleRichmond-sr6ig
    @AdekunleRichmond-sr6ig 5 місяців тому

    When I try to add a new plugin, post, theme it says This page could not be found! There is nothing working on the dashboard. Please help.

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

      Hello there 👋
      Could you drop us a message at support@hostinger.com? We will check it out together 👀

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

    Hello , I’m can you do the other of this but just on and Apple device like on iPad or iPhone because am having the same problem but on a iPad device . Iam needing help qwq

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

      Hey there, you can try the following methods to fix this error on your mobile devices:
      - Make sure your iPad is connected to the internet and has a strong signal. If your internet connection is weak or unstable, it could cause issues with your website's database connection.
      - Check your database login credentials. Verify that the database login credentials you're using in your website's wp-config.php file are correct. Double-check the database name, username, password, and hostname to ensure they are accurate.
      - If the error is caused by a corrupted database, you can try repairing it using phpMyAdmin, which is a web-based tool for managing MySQL databases. If your web hosting provider does not offer phpMyAdmin, you can try using a WordPress plugin such as WP-DBManager or WP-Optimize to repair your database.
      We hope it helps, but if you have any other questions, please write them here or send us an email at support@hostinger.com 🙏🏻

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

    Facing issue as cannot connect to db after 3 retries in hostinger..

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

      Hey there, if you find any issue with your hosting account, please get in touch with us directly by sending an email at support@hostinger.com. Our Customer Success specialists are available 24/7 and ready to give you in-depth assistance 🙏🏻

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

    I used local wp and i on localhost and i can't open mu live link and wp admin how can i fix it?

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

      Hey Pavle, if you have an issue with your local WordPress website, consider joining our WordPress group on Facebook - a lot of people are ready to help you there: facebook.com/groups/wpexplained 💜

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

    Mam this error is coming in my site also, but it is not happening properly.
    Mam my MySQL data is also deleted.
    please help me

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

      Hey there, have you tried the steps in this tutorial? 😊

  • @miamihotbox
    @miamihotbox Рік тому +1

    where is the code to check the connections?

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

      Hey there, you can check the code in the written version of this tutorial: www.hostinger.com/tutorials/wordpress-error-establishing-database-connection 🙏🏻

  • @rajudesai3069
    @rajudesai3069 Рік тому +1

    My database username and password is not showing in file manager Where will be found how to add it in file manager i follow video hostinger hpanel not show PHP my Admin 👉Files 👉 first file manager (beta) 2 second 👉file manager i chek but not 👉 public _html_now click here but not add username and password PHP my Admin How to slove porblam 👆 plz reply team

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

      Hey Raju, if you can't find your database host information in the wp-config.php file, consider using an FTP Client instead. Here's how to do so: www.hostinger.com/tutorials/wordpress/how-to-find-out-wordpress-database-name
      We hope it helps, but if you have any other questions, please write them here or send us an email at support@hostinger.com 🙏🏻

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

    How can I check the hostname?

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

      Hey there, if you're looking for a way to check your MySQL hostname, you can check this page: support.hostinger.com/en/articles/1583225-what-is-my-mysql-hostname
      If you have any other questions, please write them here or send us an email at support@hostinger.com 🙏🏻

  • @timkimdesign
    @timkimdesign Рік тому +1

    Where's the code you referenced

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

      Hello!
      You can find them here --> www.hostinger.com/tutorials/wordpress-error-establishing-database-connection and support.hostinger.com/en/articles/1583224-how-to-fix-error-establishing-a-database-connection 🚀

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

    I did everything but it’s not still work and am using hostinger

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

      Hello Chidumebi,
      please drop us a DM, and let us solve it 🙏🏻

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

    my Error establishing a database connection is not solved yet

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

      Hey there, if the steps in this video didn't work, consider checking other methods in the written version of this tutorial: www.hostinger.com/tutorials/wordpress-error-establishing-database-connection 🙏🏻

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

    Buy hosting problem

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

      Hey there, if you find any issue with your hosting account, please get in touch with us directly by sending an email at support@hostinger.com. Our Customer Success specialists are available 24/7 and ready to give you in-depth assistance 🙏🏻

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

    None of these steps worked for me

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

      Hey there, if the steps in this video didn't work, consider checking other methods in the written version of this tutorial: www.hostinger.com/tutorials/wordpress-error-establishing-database-connection 😊