static final String DB_URL = "jdbc:mysql://localhost:3306/itcsat";
static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";
l连接处没有问题,,,,
最后才发现是
sql = "select * FROM itcsat;";
Table ‘xxxxx.xxxxx‘ doesn‘t exist
在查询时没有指定表名。意思就是,我们在查询的时候只是输入了MySQL里面有的databases
但没有指定里面的哪一张表,idea就以为我们要找的表也叫xxxxx,我这里是叫itcsat。
所以应该这样
sql = "select * FROM itcsat.emp;";
emp也就是指定一张表咯。