WordPress.org

Ready to get started?Download WordPress

Forums

Don't show "can't connect to DB" screen (7 posts)

  1. thenorth3000
    Member
    Posted 2 years ago #

    Hello,

    If WordPress cannot connect to the MySQL database, it shows a page "can't connect to DB" and we must to input some information for install. This is a big security issue, so how can to solve this problem (replace by another error page or maintenance page)?

    Thank you.

  2. JarretC
    Member
    Posted 2 years ago #

    The only time this happens is when you first upload the files and the DB info isn't populated.

    If the MySQL server goes away after WP has been installed it gives an error but nowhere does it provide input fields for DB information.

    You just need to configure the install with your DB information and once that is done you won't see the setup page again.

  3. thenorth3000
    Member
    Posted 2 years ago #

    Hi Jarret,

    Because I have exceeded the "maximum number of database queries per user" on hosting and the error screen display. How can i configure done?

    Thanks.

  4. JarretC
    Member
    Posted 2 years ago #

    You can log into your server through FTP and create a wp-config.php file. There is a wp-config-sample.php file if you download WordPress that should give you a good start.

    Once you have wp-config.php setup with the proper details, you can upload it to your root WP install.

  5. thenorth3000
    Member
    Posted 2 years ago #

    Maybe i don't explain clearly. I have wp-config.php already, my website is working normally. Because i've exceeded max_user_connection of hosting, i need to wait one hour before my SQL database re-opened.

    That's why the error screen page displayed. Hence, i want to replace this page by another page like maintenance page..

  6. JarretC
    Member
    Posted 2 years ago #

    If you are getting that type of error, this is nothing you can do in terms of changing code that will help unless you stop using WordPress and move to a static site.

    Your web host is limiting the amount of queries you can perform, WP has to connect to the database in order to work. If your host is cutting off access there is nothing you can do other than moving to a different host or upgrade your web hosting plan to handle more traffic.

    I would contact your web host and see if they can diagnose what is causing you to hit your limit. It could be a plugin that is causing the issue or a theme setting.

  7. thenorth3000
    Member
    Posted 2 years ago #

    I'm using Globat hosting. Do you know what's plugin resolve this issue?

Topic Closed

This topic has been closed to new replies.

About this Topic