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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
184 | medicalphoto 구연 | WHRIA | 2008.06.02 | 6996 |
183 | Clinical Study | WHRIA | 2007.08.13 | 7031 |
182 | 제 홈페이지를 두배로 즐기려면??? | 한승석 | 2000.06.09 | 7044 |
181 | 사랑에 빠지다 | WHRIA | 2007.07.06 | 7045 |
180 | Medicalphoto 홈페이지 개편 | WHRIA | 2012.04.10 | 7091 |
179 | MS 가 리눅스개발자를 구한다는데 | WHRIA | 2012.01.29 | 7094 |
178 | Deep learning 기반 DEMO | WHRIA | 2018.09.16 | 7103 |
177 | go~ go~ go~ | WHRIA | 2008.08.19 | 7126 |
176 | 피부암 | WHRIA | 2008.08.13 | 7127 |
175 | inception | WHRIA | 2017.01.23 | 7188 |
174 | 신한 | WHRIA | 2008.10.27 | 7202 |
173 | 인생의 방향 | WHRIA | 2007.09.18 | 7203 |
172 | ssl | WHRIA | 2008.06.09 | 7207 |
171 | 인생 헛살지는 않았다. | WHRIA | 2007.07.24 | 7227 |
170 | 버릴 것은 버리십시요. | WHRIA | 2007.08.09 | 7236 |