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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1819 | Afrikaans - Afrikaans | WHRIA | 2024.05.24 | 0 |
1818 | Albanian - shqip | WHRIA | 2024.05.24 | 0 |
1817 | Amharic - አማርኛ | WHRIA | 2024.05.24 | 0 |
1816 | Arabic - العربية | WHRIA | 2024.05.24 | 0 |
1815 | Armenian - հայերեն | WHRIA | 2024.05.24 | 0 |
1814 | Azerbaijani - azərbaycan | WHRIA | 2024.05.24 | 0 |
1813 | Bangla - বাংলা | WHRIA | 2024.05.24 | 0 |
1812 | Basque - euskara | WHRIA | 2024.05.24 | 0 |
1811 | Belarusian - беларуская | WHRIA | 2024.05.24 | 0 |
1810 | Bosnian - bosanski | WHRIA | 2024.05.24 | 0 |
1809 | Burmese - မြန်မာ | WHRIA | 2024.05.24 | 0 |
1808 | Catalan - català | WHRIA | 2024.05.24 | 0 |
1807 | Chinese (China) - 中文(中国) | WHRIA | 2024.05.24 | 0 |
1806 | Chinese (Taiwan) - Chinese (Taiwan) | WHRIA | 2024.05.24 | 0 |
1805 | Corsican - Corsican | WHRIA | 2024.05.24 | 0 |