Auth0 Home Blog Docs

Custom Database Issue

custom-database

#1

I am trying to access my database using the MySql script you have provided. Get the following error:

connect ECONNREFUSED 127.0.0.1:3306

I have whitelisted all the IPs that you recommend.

I have updated the host: , user: , password:, database:

Why would I continue to get this error?


#2

Based on the information provided the script you configured is trying to connect to IP address 127.0.0.1 which maps to the localhost host name (https://en.wikipedia.org/wiki/Localhost) which would mean that the Auth0 server running the script would try to connect to a database located within the Auth0 server itself (which does not exists).

The default scripts use the localhost host as a placeholder that you need to replace with an host that can be resolved publicly (it should also be possible to specify an IP address directly), more specifically the machine hosting your MySQL database needs to be reachable from the Internet.


#3

That was the issue! Thanks. I changed out the IP address in the script and was able to connect to the database. Thanks!


#4

That was the issue! Thanks. I changed out the IP address in the script and was able to connect to the database. Thanks!


#5