import java.sql.*;public class test {       public static void main(String[] args) {              String driverName = "com.mysql.jdbc.Driver";              String dbURL = "jdbc:mysql://localhost/crm";              String userName = "dddd";              String userPwd = "fff";              String str_sql="select * from tablename";               try {                     Class.forName(driverName);                     System.out.println("导入MYSQL驱动成功!");              } catch (Exception e) {                     System.out.println("导入MYSQL驱动失败!");              }               try {                     Connection connect = DriverManager.getConnection(dbURL, userName,                                   userPwd);                     System.out.println("成功得到Mysql连接!");                      Statement stmt = connect.createStatement();                     ResultSet rs = stmt.executeQuery(str_sql);                     while (rs.next()) {                            System.out.print("功能名称="+rs.getString(1)+"<--->功能变量=");                            System.out.println(rs.getString(2));                     }              } catch (Exception e) {                     System.out.println("取数据失败!");              }        }}