-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MariaDB/WordPress connection issue probabbly] Wordpress can not connect to DB #1634
Comments
Hi @Kurt57, Thanks for using Bitnami. I have checked your bndiagnostic data and I have found a couple of errors. First, the MariaDB database is not running due to the next error:
It is so weird you can not write into the
The other error I have found is that MariaDB is not monitored by Gonit. Did you update anything in its configuration? Apart from this, it looks like there are a few IP addresses performing a lot of requests to your website. We recommend you to check our guide about bots and how to block them in case it is necessary |
The error you're encountering indicates that your WordPress site is unable to connect to the MariaDB database. The Bitnami diagnostic tool output points to several potential issues, including MariaDB not running and connectivity problems. Here's how you can troubleshoot this: Steps to Fix the Issue: First, verify if MariaDB is running. You can do this by SSHing into your server and running the following command: Ensure that the database credentials in the wp-config.php file are correct. You can access the file by running: The diagnostic tool indicated that ports 22, 80, or 443 might not be accessible. This can affect your site's connectivity. Ensure that the ports are open: The Apache error log contains warnings related to database connections. To diagnose further, review the Apache logs: If you notice a high number of incoming requests, it might indicate a bot attack. You can block suspicious IPs using the .htaccess file or through the server firewall. After making these changes, restart the services to see if it resolves the issue: |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
Platform
AWS
bndiagnostic ID know more about bndiagnostic ID
57f644d4-4081-b7b1-0857-7c0137676e44
bndiagnostic output
===== Begin of bndiagnostic tool output =====
[Connectivity]
Server ports 22, 80 and/or 443 are not publicly accessible. Please check the
following guide to open server ports for remote access:
https://docs.bitnami.com/general/faq/administration/use-firewall/
[Mariadb]
Press [Enter] to continue:
Found recent error messages in the MariaDB error log:
Please check the following guide to troubleshoot MariaDB issues:
https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-m
ariadb/
[Processes]
One or more component's processes are not running:
You can try to restart the process with the following command:
$ sudo /opt/bitnami/ctlscript.sh start COMPONENT_NAME
[Apache]
Found recent error or warning messages in the Apache error log.
Press [Enter] to continue:
Please check the following guide to troubleshoot server issues:
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro
rs-apache/
A high number of incoming requests originate from one or more unique IP
addresses. This could indicate a bot attack. The following guide shows how to
check for and block suspicious IP addresses.
Press [Enter] to continue:
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-
bots-apache/
===== End of bndiagnostic tool output =====
bndiagnostic was not useful. Could you please tell us why?
it was successful
Describe your issue as much as you can
i am getting this issue while try to open my Wordpress website
Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /opt/bitnami/wordpress/wp-includes/class-wpdb.php on line 1982
Connection refused
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at 127.0.0.1:3306 could not be established. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure you have typed the correct hostname?
Are you sure the database server is running?
If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.
The text was updated successfully, but these errors were encountered: