Can't connect to localhost mysql using custom database

I am using custom database to connect with my localhost database and get ETIMEDOUT error . I read about it must be public address and allow inbound connections from some IPs.

I used mysql-workbench to connect to public ip, and everything works fine.
This is my login script

And this is my ip allow list:
image

I really don’t understand clearly about allow inbound connections part. So i think i did something wrong at that step. Can any one please help me? Thank you very much

And i have 1 more question. I want to use auth0 DB to store some sensitive data like email and password. Other information i will store at my external DB, and i will create field auth0_id to get data in auth0. Is it possible to use 2 DB at the same time?

Hi @manhhoang3151996

The Custom DB script runs on a server inside of Auth0. It cannot access a localhost address on your computer.

You must use a non-localhost non-VPN address for your DB.

For your second question: the answer is yes. Normally with Auth0, Auth0 stores the Identy data such as username and password, and your applications stores all other data about the user. The two databases are linked via a user ID (either Auth0’s user ID or yours)

John

2 Likes

@john.gateley thank you for helping me :grinning:
For my second question, so i think i don’t need to connect with an external DB, i just get user information after they login then query in my DB to get other information :smiley:. But if i don’t use custom DB, is it possible for me to create user in Auth0 DB via API?

I use ngrok for this type of scenario.

Hi @manhhoang3151996

Yes, you can create a user via the management API in Auth0.

John

2 Likes

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