DBI Environment Variables

DBI consults several environment variables, listed in Table G.3. All of them except DBI_TRACE are used by the connect() method. DBI_TRACE is used by the trace() method.

Table G.3. DBI Environment Variables
NameMeaning
DBI_DRIVERDBD-level driver name ("mysql" for MySQL)
DBI_DSNData source name
DBI_PASSPassword
DBI_TRACETrace level and/or trace output file
DBI_USERUsername

Get MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.