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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1521 | Re: [TIP] 유동 IP 로 서버 만드는 법 | 애국자 | 2001.03.29 | 2155 |
1520 | ^^*v 저 또 왔어요 | Schauberger | 2001.03.30 | 2062 |
1519 | 노 벨 | 채영광 | 2001.04.04 | 2078 |
1518 | Re: ^^*v 저 또 왔어요 | 한승석 | 2001.04.07 | 1975 |
1517 | congratulation!! | soma | 2001.04.07 | 2110 |
1516 | 들렸다가오... | 기갑형 | 2001.04.14 | 2057 |
1515 | 의석아 너 사진이다. | 한승석 | 2001.04.20 | 2093 |
1514 | Iczelion | 한승석 | 2001.04.21 | 2075 |
1513 | ^^*v 호호 | Schauberger | 2001.04.24 | 2057 |
1512 | 봄기운 | 김다솜 | 2001.05.14 | 2064 |
1511 | 프리 되는 레지스트리 | .. | 2001.05.23 | 2071 |
1510 | 정식 | .. | 2001.05.23 | 2056 |
1509 | 달리기 | 김다솜 | 2001.06.01 | 2350 |
1508 | 퀴즈하나 !! | schauberger | 2001.06.09 | 2067 |
1507 | Re: 퀴즈하나 !! | 한승석 | 2001.06.12 | 2067 |