连接SQLyog,登陆界面![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/3384f695dc94b7a439d0134425d11f49.png)
数据库连接
package blackwhite.black;
import java.sql.*;
public class Test1Jdb {
public static void main(String[] args){
Connection connection = null;
PreparedStatement statement = null;
ResultSet resultSet = null;
try {
Class.forName(“com.mysql.jdbc.Driver”);
connection = DriverManager.getConnection(“jdbc:mysql://127.0.0.1:3306/nbcj?useSSL=true&characterEncoding=utf-8&user=root&password=123456”);
System.out