Missing localhost & 127.0.0.1 Host at mysql.user

Keywords: WordPress - AWS - Technical issue - Permissions

bnsupport ID: 79eb748b-4318-780f-9d6c-0f3df5e6d9a6

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

Description:
Hi! It all started when I get a “Error establishing a database connection” at my WP installation.

I follow most of the troubleshooting guide I found here:

  1. Reboot the instance and restart the services - nothing happens
  2. I run “sudo su” to remove all the permission denied issue.
  3. Check mysql.log - I found tremendous amount of ACCESS DENIED WARNING for ‘bn_wordpress’@‘localhost’ .
  4. Run mariadb to try to change the password of localhost and 127.0.0.1

But I always got an error ERROR 1396 (HY000): Operation ALTER USER failed for ‘bn_wordpress’@‘localhost’

I try to run a query to check the available user & host, and this is what I found:

MariaDB [(none)]> select host, user from mysql.user;
±-----±-------------+
| host | user |
±-----±-------------+
| % | bn_wordpress |
| % | root |
±-----±-------------+
2 rows in set (0.000 sec)

the localhost & 127.0.0.1 are missing, I hope you could assist me further. I run out of troubleshooting option. Thank you.

Hello @optymizer,

Thanks for using our WP stack! Checking your VM configuration, I saw that your site is up and running. Were you able to fix the issue or are you still having problems?

If the problem persists, could you please share the output of the following command:

tail -n 30 /opt/bitnami/mariadb/data/mysqld.log

Regards,
Francisco de Paz

Hi @fdepaz,

No, we didn’t solve it yet. We created a new instance and redo all the website.

We still want to solve it for future troubleshooting guide, incase it happen again.

When I run the command you provide it gives me “No such file or directory”

Hello @optymizer,

Could you try instead with the following path:

sudo tail -n 30  /opt/bitnami/mariadb/logs/mysqld.log

Besides that, did you try modifying the bn_wordpress password without specifying the host:

ALTER USER 'bn_wordpress'@'%' IDENTIFIED BY 'new_password';

Regards,
Francisco de Paz

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.