(1)在u层的APP.config文件下写配置文件
(2) 在连接数据库的类中书写代码 引用命名空间
using System.Data; using MySql.Data; using MySql.Data.MySqlClient;