So, I am trying to connect my external database to my bot using the ‘mysql’ Node Package. Previously, I had to flush hosts due to too many connection errors. Now, after doing it again, I am totally locked out.
throw err; // Rethrow non-MySQL errors
^
Error: ER_HOST_NOT_PRIVILEGED: Host ‘ec2-107-20-54-45.compute-1.amazonaws.com’ is not allowed to connect to this MariaDB server
Hey @Awestruck, that error message sounds like the host your project is running on hasn’t been granted access to your MySQL server. Depending on how your database is being hosted it’s not unusual to have to whitelist your project’s host with your database service.
If you use the console you can run curl ifconfig.co and you’ll get your current host’s IP address. Keep in mind that this IP address will change every so often and you’ll have to update your whitelist.