sqlite to mysql
2016.10.18 09:41
HowTo: Migrate a database dump from SQLite to MySQL
Grab the (sqlite) sql dump an fire up your editor:
sqlite3 db/development.sqlite .dump .quit > dump.sql
You have to make these replacements:
- replace all double-quotes (") with grave accents (´) (in vim just type :%s/"/´/)
- replace "autoincrement" with "auto_increment"
- remove "BEGIN TRANSACTION;" from the beginnig of the dump
- remove "COMMIT;" from the end of the dump
- remove all lines containing "sqlite_sequence"
Now you can simply import your new MySQL dump.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1701 | 2만원 | WHRIA | 2010.02.11 | 14168 |
1700 | WHRIA WORLD (http://whria.net) | 한승석 | 2002.04.12 | 14101 |
1699 | 서버가 노후되었음 | WHRIA | 2010.04.11 | 13883 |
1698 | FODORA 에서 영문 LINUX 상태에서 한글 입력방법 [1] | han | 2004.10.07 | 13877 |
1697 | 개원 | WHRIA | 2010.04.03 | 13250 |
1696 | That's why I was lucky ... | WHRIA | 2007.08.08 | 13214 |
1695 | DeltaCopy 퍼미션 문제 | WHRIA | 2013.01.22 | 13073 |
1694 | 사진 | WHRIA | 2010.01.19 | 13022 |
1693 | 볼펜 주문 [1] | WHRIA | 2009.12.20 | 12818 |
1692 | 예전 홈페이지 찾았다~ | han | 2005.09.14 | 12450 |
1691 | mysql replication [1] | WHRIA | 2012.02.26 | 12359 |
1690 | 인테리어가 거의 끝나간다. | WHRIA | 2010.01.03 | 12170 |
1689 | 명함 | WHRIA | 2009.12.10 | 11180 |
1688 | 세무관련 블로그 | WHRIA | 2009.12.22 | 11012 |
1687 | SSD 참 좋군 | WHRIA | 2012.12.19 | 10572 |