eclipse用jdbc连接mysql数据库时,url是填什么?怎样找出地址?

1.首先登录mysql,查看mysql的数据,选择*fromtest_data1t

3.编写javajdbc代码,

Stringdriver='com.mysql.cj.jdbc.Driver';

Stringurl='jdbc:mysql://localhost:3306/testdb?characterEncoding=utf8&useSSL=false";

Stringuser='root';

Stringpwd='123456';

4.MySQL中代码查询数据表并找到table*fromtest_data1的内容

jdbc连接mysql时中的URL怎么写的

jdbc:mysql://localhost:3306:test解析如下:jdbc:mysql://指JDBC连接方式localhost:指数据库端口号3306SQL;tu要连接的数据库的地址。