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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1641 | 이사 감사 3년 변경등기 | WHRIA | 2015.12.02 | 56 |
» | sqlite to mysql | WHRIA | 2016.10.18 | 57 |
1639 | lvm 축소 확장 [4] | WHRIA | 2020.01.13 | 57 |
1638 | php 세션 로그인 | WHRIA | 2020.04.24 | 57 |
1637 | bay trail ubuntu 20.04 [1] | WHRIA | 2020.12.24 | 57 |
1636 | 저녁 10시에 자동 종료 스크립트 | WHRIA | 2016.06.25 | 59 |
1635 | swap memory | WHRIA | 2019.03.14 | 59 |
1634 | 정량화 논문들 | WHRIA | 2023.02.16 | 60 |
1633 | sroc [1] | WHRIA | 2020.12.10 | 61 |
1632 | zmq async client server [1] | WHRIA | 2020.03.12 | 62 |
1631 | chat GPT | WHRIA | 2023.02.16 | 62 |
1630 | LG 글로벌 | WHRIA | 2019.01.31 | 63 |
1629 | 원격 진료 | WHRIA | 2023.03.23 | 63 |
1628 | 드리블 | WHRIA | 2019.04.12 | 64 |
1627 | xml json pascal [4] | WHRIA | 2020.01.12 | 64 |