The correct answer will depend on what what you mean by a read-only connection.
Setting the ReadOnly DBI attribute with a DBD::mysql database handle doesn't do anything useful; it's just advisory as explained in the section you linked.
If you want to check if the database is read-only (as is common on a slave), the user only has select priviledges or if the transaction is read-only then you will need to write the appropriate queries to figure those out.
In reply to Re: How to know if a DBI connexion is read-only?
by Mr. Muskrat
in thread How to know if a DBI connexion is read-only?
by citromatik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |