Eclipse Hibernate.cfg.xml is linking "sys" database from MySQL
I guess sys is the default schema in your MySQL workbench.
Go to your Mysql workbench and drop the schema/because it is importing all the schemas from your local server.
or
Custom :- Open your workspace(eclipse("run" tab on top of screen->hibernate code genration) -> Go to hibernate code generation( -> click main-> revenge.xml->select new -> select folder-> configure table filter-> (1)select database you want to select-> import all table-> apply -> Run .
Now you can see all the tables in the location you have selected. If you want to customer export you could also do so after (1) step above
For those with a similar issue to this. Hibernate tools reverse engineering reads all schemas. Therefor specifying the database doesn't work. So you need a custom schema selection tag to specify which database you want reverse engineer from. This is done by creating a hibernate.reveng.xml
file and adding something like this where demo
is the name of the database
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd">
<hibernate-reverse-engineering>
<schema-selection match-catalog="demo" match-schema=".*" match-table=".*"/>
</hibernate-reverse-engineering>