package com.xushiwei;
import java.beans.Statement;
import java.sql.*;
public class jdbc {
private static final String URL="jdbc:mysql://127.0.0.1:3306/xushiwei";
private static final String USER="root";
private static final String PASSWORD="123456";
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection(URL,USER,PASSWORD);
java.sql.Statement xushi=conn.createStatement();
ResultSet x=xushi.executeQuery("select name from miao ");
while(x.next()){
System.out.println(x.getString("name"));
}
}
}
Caballarii
染红_街道
唯灬独
狙翎利利
woshi123w