1.导入mysql驱动包 2. 注册驱动 3. 获取数据库连接对象 connection 4. 定义sql 5. 获取执行sql语句的对象 statement 6. 执行sql,接受返回结果 7. 处理结果 8. 释放资源