Couldn't access MySQL DB

Greetings everyone,

I have a frontend and a MySQL database running on a specific host. My backend is running on render, it is a node.js application that uses prisma to manage connections.

Using a localhost, I’m able to access the data. I have added an access host which regards my PC IP in cPanel and it works fine. However, when I try to access from render it returns an error:

“Authentication failed against database server at 0.0.0.0 (some IP), the provided database credentials for user are not valid.”

I have set an environment variable with general model (I’m using pseudonyms here for exemplification):

mysql://user:password@host:port/database

Now I’m wondering:

Should I set an IP regarding render app?
What’s wrong with my procedure?
Is there another way to set the environment variable?

Can anybody help me with this questions?

Thank you.

1 Like

Hey Jakunzler, can you post your error log here?

This issue can be as a result of 2 things,

  1. your Databse connection string ( check the connection string and details to see if its correct)
  2. Your MySQL server firewall ( Blocking your render IP address ) so to fix this, you need to allow your Render IP address , or you can allow IP address from any where. by using 0.0.0.0
    or using 0.0.0.0 as start IP address and 255.255.255.255 as End IP address.

thank you , try this and let me know what the result is.

1 Like

Hello Obiabo_Immanuel,

thank you for your prompt response.

In fact, point 2 was the reason. I solved the problem by setting the access host as “%”, which is equivalent to what you suggested.

Best regards.

1 Like

I am glad the solution helped.

Let me know if you have any other further issues

1 Like

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