Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Answer: How can I see error messages from MySQL?

( #21753=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > How can I see error messages from MySQL? contributed by BBQ

DBI has return values for each one of its calls, so it would be wise to or your connect statement, like:
$dbh = DBI->connect("DBI::mysql ... etc $dsn") or die("Couldn't connect to $dsn: $DBI::errstr\n");
this way, you'll always get an error message if something goes wrong.

Comment on Answer: How can I see error messages from MySQL?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2015-07-29 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls