Reputation: 11
I have already created one MySQL database.Now i want to create another MySQL database with same structure without data through java code(without create database,table queries in java) like export or import through Command Prompt. I do not know is this possible or not? please suggest any answer.
Upvotes: 1
Views: 304
Reputation: 9925
Hard way: you can create a bash script to export old data and generate the new one based on your exported data and then, let java execute it for you
Better way: Use liquibase to migrate your database. You can export your data into Xml file and then, again use Liquibase API to import the data from Xml file to your new database
Upvotes: 1