# db-conn-mysql **Repository Path**: sparklex/db-conn-mysql ## Basic Information - **Project Name**: db-conn-mysql - **Description**: db-conn-mysql - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-10 - **Last Updated**: 2025-01-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MySQL implementation of db-conn (JDBC Like) ## Connect to datanase ``` const config: MySqlConnectionConfig = { host: 'localhost', user: 'root', database: 'test', password:'*******' }; let conn = await driver.connect(config); let data = await conn.executeQuery("select 1 from dual"); await conn.close(); ``` ## Connection Pool ``` const config = { host: 'localhost', user: 'root', database: 'test', password: '******' }; const oPool = new MySqlDataSource(config); const conn = await oPool.getConnection(); await conn.close(); await oPool.close(); ```