#!/bin/bash echo "测试MySQL连接..." echo "密码: 1234567890" mysql -uroot -p1234567890 -h127.0.0.1 -e "SHOW DATABASES;" 2>&1 | head -20