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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1639 | 제 홈페이지를 두배로 즐기려면??? | 한승석 | 2000.06.09 | 7062 |
1638 | 사랑에 빠지다 | WHRIA | 2007.07.06 | 7051 |
1637 | Clinical Study | WHRIA | 2007.08.13 | 7041 |
1636 | topsite | WHRIA | 2008.11.13 | 7019 |
1635 |
medicalphoto 구연
![]() | WHRIA | 2008.06.02 | 6998 |
1634 | hipass | WHRIA | 2008.11.09 | 6988 |
1633 | 토렌트 검색 site 만들었음 | WHRIA | 2012.02.14 | 6982 |
1632 | 뻥스펙 | WHRIA | 2013.02.24 | 6980 |
1631 | 찜카드 | WHRIA | 2008.05.19 | 6971 |
1630 | 거미 [3] | WHRIA | 2007.10.19 | 6969 |
1629 | 승석이형 너무 멋져요... | 김중희 | 2000.06.08 | 6953 |
1628 | Google Document | WHRIA | 2008.11.29 | 6922 |
1627 | 피델리티 차이나 | WHRIA | 2007.09.26 | 6919 |
1626 | adsense | WHRIA | 2009.01.16 | 6911 |
1625 | 오랜만에 글을 남김 | WHRIA | 2012.01.18 | 6894 |