qianxuwanyu commented on issue #14177:
URL:
https://github.com/apache/shardingsphere/issues/14177#issuecomment-998497457
- //注册驱动程序 mysql 5+ or 8+
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
//获得连接
String url =
"jdbc:mysql://localhost:3307/fintax_tax_proxy?useSSL=false";
Connection con = DriverManager.getConnection(url, "root", "root");
//检索元数据对象
DatabaseMetaData metaData = con.getMetaData();
//it's ok
ResultSet columnData = metaData.getColumns("fintax_tax_proxy",
"fintax_tax_proxy", "config_area", null);
//failed
ResultSet primaryKeys = metaData.getPrimaryKeys("fintax_tax_proxy",
"fintax_tax_proxy", "config_area");
Exception in thread "main"
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
'fintax_tax_proxy.config_area' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]