简体   繁体   中英

mysqlimport or LOAD DATA INFILE with Multipoint datatype

I have a column in a table that has type multipoint . How do I structure the data in my file to either use mysqlimport or the LOAD DATA INFILE construct to import this file?

Right now my data is in a plaintext json-formatted file (not in a database) and I would like to structure it to be compatible for import.

I am using MariaDB 15.1

Probably this is all you need:

mysqldump --hex-blob ...

A subsequent reload using mysql should be able to exactly reconstruct the data.

LOAD DATA would need some extra code to deal with the conversion -- either geomFromText or unhex. That should be possible; do you prefer LOAD DATA ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM