I have a .db file located in my sdcard and I wonder how to convert it to MySQL database script including insert statement.
Asked
Active
Viewed 755 times
0
-
3[Why do you hate Google?](http://stackoverflow.com/questions/18671/quick-easy-way-to-migrate-sqlite3-to-mysql) – Digital Chris Dec 24 '13 at 15:27
-
sorry , I used google all time but over here I found my self very far , just I need a sight to the great path. – Dec 24 '13 at 15:30
1 Answers
0
Without knowing what created the orginal db, I'll assume it was created by sqlite.
- Copy the .db file to you local computer using adb
- Open the .db file in Valentina Studio (license is free, crashes far less than MesaSQLite)
- Select a table in schema editor
- Right/Alternate click the table name
- Generate SQL
- Show Create
And in a new editor tab that appears, you will have a sql create statement you can use for your mysql server. Note: Depending on the complexity of your table you may need to apply corrected syntax for it to work in mysql.
If you need to copy the rows contained in your selected table you can create a dump (from right click on table) and then import.
Hope this helps.