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 | fcitx | WHRIA | 2020.04.05 | 32 |
1700 | kernel load | WHRIA | 2020.04.03 | 33 |
1699 | CE | WHRIA | 2020.05.17 | 33 |
1698 | letencrypt - win | WHRIA | 2018.08.12 | 34 |
1697 | exif remove | WHRIA | 2020.01.28 | 34 |
1696 | chatbot | WHRIA | 2020.04.03 | 34 |
1695 | git 특정 버젼 | WHRIA | 2020.07.11 | 34 |
1694 | 감가상각 계산 | WHRIA | 2015.11.30 | 35 |
1693 | kaggle leakage | WHRIA | 2019.12.19 | 35 |
1692 | raid 6 rebuild | WHRIA | 2020.01.07 | 35 |
1691 | 의료영상분석장치 분류 코드 | WHRIA | 2020.04.22 | 35 |
1690 | conflict of interest | WHRIA | 2020.05.03 | 35 |
1689 | calendar javascript dropdown | WHRIA | 2020.03.01 | 36 |
1688 | 너무도 많이 변해버린 c++ | WHRIA | 2016.08.15 | 37 |
1687 | pytorch - caffe | WHRIA | 2019.12.19 | 37 |