驱动复制过后,不需要在配置其它了,只需要写连接即可:
Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection("jdbc:mysql://"+host+"/"+dbname,username,password);
Statement Stmt=conn.createStatement();
ResultSet rs=Stmt.executeQuery(sql);
这是基本的数据库操作方法
大概流程就是加载驱动类,创建连接,执行数据库操作,关闭
就是构建路径而已,没有必要非要在lib下,盘里面一样可以的
build
path