Database connection in production

Database connection in production

  

I used an external database in my application and its working fine in development environment. Now for deploying application to production, I created same database connection in production environment under Administration-> Database connections. Result of "test connection" is passed for this database connection.

Now I deployed application from development to production. But in production application not able to access database. Please suggest where I missed step or configuration. or how I can check or debug application for errors.

Thanks in advance.

Hi Vikas,

"not able to access" is very vague, and not enough for trouble shooting. What kind of errors do you see in Service Center?

Kilian Hekhuis wrote:

Hi Vikas,

"not able to access" is very vague, and not enough for trouble shooting. What kind of errors do you see in Service Center?


There is not any error in service center. But when I run my production application there is not any data in that. 


Not having data is different from "not able to access". "Not able to access" means that you established that there was an access problem. If there are no errors, for all we know the database connection is fine, and there's a bug in your application.

Kilian Hekhuis wrote:

Not having data is different from "not able to access". "Not able to access" means that you established that there was an access problem. If there are no errors, for all we know the database connection is fine, and there's a bug in your application.

But same application is working in development mode with same modules only change is I created new database connection for production. I just want to confirm that after creating new database connection in production, Do I need to make any changes in application or in some configuration, so that application can connect new production database.


Hi Vikas,

The data in production is probably different, so perhaps data that works in development doesn't work in production (or at least not as suspected). You could try to create a very simple application that queries a single table that you know has data in it, and see whether that works.

Kilian Hekhuis wrote:

Hi Vikas,

The data in production is probably different, so perhaps data that works in development doesn't work in production (or at least not as suspected). You could try to create a very simple application that queries a single table that you know has data in it, and see whether that works.

Hi Kilian,

Thanks for quick response. But don't think this is the case, as I tried with same database, same schema name, same connection string in both development and production. I suspect, am missing on some configuration after creating new database thats why that database is not getting access in my application. 


Hi Vikas,

If there's anything wrong with the connection itself, I would expect at least some error in Service Center. Again, to troubleshoot I would create a simple app that use the connection and logs some stuff in the General Log to see where it might go wrong.