База данных подключения код Java
import java.sql.*;
public class Bddconnection {
public static void main(String[] args) {
try{
//username:admin,password:admin,table:login,
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bdd_test","admin","admin");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from login");
while(rs.next())System.out.println(rs.getInt(1)+" "+rs.getString(2));
con.close();
}catch(Exception e){System.out.println(e);}
}
}
Glorious Gharial