const mysql = require('mysql2/promise'); (async () => { const c = await mysql.createConnection({ host: 'localhost', user: 'root', password: '74191221', database: 'competition_db' }); const [t] = await c.query('SHOW TABLES'); t.forEach(r => console.log(Object.values(r)[0])); await c.end(); })();