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 | swap memory | WHRIA | 2019.03.14 | 59 |
» | sqlite to mysql | WHRIA | 2016.10.18 | 57 |
182 | lvm 축소 확장 [4] | WHRIA | 2020.01.13 | 57 |
181 | php 세션 로그인 | WHRIA | 2020.04.24 | 57 |
180 | bay trail ubuntu 20.04 [1] | WHRIA | 2020.12.24 | 57 |
179 | DD-WRT 펌웨어로 버팔로 G450H 를 업그레이드 | WHRIA | 2015.11.22 | 56 |
178 | 이사 감사 3년 변경등기 | WHRIA | 2015.12.02 | 56 |
177 | 증시의 허풍 예언들 | WHRIA | 2015.11.20 | 55 |
176 | 이율초재 | WHRIA | 2014.10.20 | 54 |
175 | 멀티캐스트 | WHRIA | 2015.11.03 | 53 |
174 | startup | WHRIA | 2020.05.08 | 53 |
173 | WOL shutdown | WHRIA | 2016.01.22 | 52 |
172 | psexec | WHRIA | 2016.07.28 | 52 |
171 | center % crop | WHRIA | 2018.12.27 | 52 |
170 | 싸이월드도 없어지는구나 | WHRIA | 2015.10.10 | 51 |