943,154 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 1640
  • MySQL RSS
Mar 4th, 2010
0

Converting MySQL tables to SQLite

Expand Post »
Does any one know how to use SQLite? Can anyone tell me how to convert populated MySQL tables to SQLite tables without using a DBConvert software?
Reputation Points: 10
Solved Threads: 0
Light Poster
ChPravin is offline Offline
49 posts
since Jul 2008
Mar 10th, 2010
0
Re: Converting MySQL tables to SQLite
Click to Expand / Collapse  Quote originally posted by ChPravin ...
Does any one know how to use SQLite? Can anyone tell me how to convert populated MySQL tables to SQLite tables without using a DBConvert software?
You could use mysqldump on the MySQL DB and create a plain SQL file from that. Then you could make this SQL file SQLite compatible using whatever text editor you like (vi, nedit, emacs, ...), this would basically be just the removal of some MySQL specials like COLLATION, the storage engine and so on. Global search / replace will do that for you.

In addition you might want to split the CREATE TABLE section and the INSERT INTO section into two separate files.

Then fire up sqlite and source the create table SQL file first and then the insert into file.
Reputation Points: 9
Solved Threads: 9
Junior Poster in Training
maba001 is offline Offline
55 posts
since Jun 2008
Mar 10th, 2010
0
Re: Converting MySQL tables to SQLite
Thanks for the reply!
Reputation Points: 10
Solved Threads: 0
Light Poster
ChPravin is offline Offline
49 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Problem with Perl and MySql - Cyrillic Language
Next Thread in MySQL Forum Timeline: Copying database from local system to a remote system





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC