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.
Asked
Active
Viewed 299 times
1 Answers
1
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

Thai Tran
- 9,815
- 7
- 43
- 64
-
I do not want run it on command prompt or any other application.it should be done through java code only means we use query create table to create table similarly any answer for copy structure. – user2637538 Sep 20 '13 at 07:38
-
then you can go with the Liquibase way. Everything could be done from the java side – Thai Tran Sep 21 '13 at 03:42