const mysql = require('mysql2/promise');

async function main() {
  const conn = await mysql.createConnection({
    host: '8.136.223.156',
    port: 6630,
    user: 'media_manager',
    password: 'media_manager',
    database: 'media_manager'
  });
  
  // 获取所有系统配置
  const [configs] = await conn.query(`
    SELECT config_key, LEFT(config_value, 50) as config_value
    FROM system_config
    ORDER BY config_key
  `);
  
  console.log('=== 系统配置 ===');
  configs.forEach(c => {
    console.log(`${c.config_key}: ${c.config_value}${c.config_value.length >= 50 ? '...' : ''}`);
  });
  
  await conn.end();
}

main().catch(console.error);
