I am using DataMapper to interface with MySql. Is there any check I can do with Datamapper to ensure that the database is up?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to test whether you can actually do some work with your database, something like this could be helpful:
This will make sure that the server is up and that the database you chose is valid (that’s why something like
SELECT 1wouldn’t work).