Doomed to Wordpress

Serious Reflections During the Life of Jeremy Fisher

   

Subscribe
Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

Flavours
There's more than one way to view this weblog; try these flavours on for size.

  • index
  • circa 1993
  • RSS
  • Links
    These are a few links to my other sites.

  • Ставропигиальныя Пластинки
  • Анкылым
  • Русское Шрифтовое Зало
  • Gopher (Proxied)
  • More about Gopher
  •        

    2020/09/21 local infile

    По умолчанию в MySQL не включена возможность LOAD DATA LOCAL INFILE на удалённый сервер. Запускать клиент нужно с ключом --local-infile:

    mysql -u user -p --local-infile -h host dbname
    

    После этого данные загружаются так:

    load data local infile '/path/to/local/file.csv' \
    into table table_name character set utf8 FIELDS \
    TERMINATED BY ','  ENCLOSED BY '"' LINES \
    TERMINATED BY '\n' (field, names, list);
    

    #mysql

    permanent link