Spaces:
Sleeping
Sleeping
File size: 600 Bytes
c01955c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import mysql from 'mysql2/promise';
async function checkSchema() {
let connection;
try {
connection = await mysql.createConnection({
host: 'localhost',
user: 'root',
password: "Vansh@1234mysql",
database: "ml_learner"
});
const [rows] = await connection.execute('DESCRIBE questions');
console.log("Table Schema:");
console.table(rows);
} catch (error) {
console.error("Error checking schema:", error);
} finally {
if (connection) await connection.end();
}
}
checkSchema();
|