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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1744 | Georgian - ქართული | WHRIA | 2024.05.24 | 9 |
1743 | Galician - galego | WHRIA | 2024.05.24 | 1 |
1742 | French - français | WHRIA | 2024.05.24 | 10 |
1741 | Finnish - suomi | WHRIA | 2024.05.24 | 6 |
1740 | Filipino - Filipino | WHRIA | 2024.05.24 | 27 |
1739 | Estonian - eesti | WHRIA | 2024.05.24 | 6 |
1738 | Esperanto - esperanto | WHRIA | 2024.05.24 | 7 |
1737 | Danish - dansk | WHRIA | 2024.05.24 | 12 |
1736 | Dutch - Nederlands | WHRIA | 2024.05.24 | 24 |
1735 | Danish - dansk | WHRIA | 2024.05.24 | 14 |
1734 | Czech - čeština | WHRIA | 2024.05.24 | 17 |
1733 | Croatian - hrvatski | WHRIA | 2024.05.24 | 9 |
1732 | Corsican - Corsican | WHRIA | 2024.05.24 | 19 |
1731 | Chinese (Taiwan) - Chinese (Taiwan) | WHRIA | 2024.05.24 | 14 |
1730 | Chinese (China) - 中文(中国) | WHRIA | 2024.05.24 | 15 |