Skip to content

Import Example Database does not work with 'tiup client' #6647

@morgo

Description

@morgo

Change Request

  1. Describe what you find is inappropriate or missing in the existing docs.

This error was reported by @Alkaagr81

On https://docs.pingcap.com/tidb/stable/import-example-data

The step to LOAD DATA INFILE does not work with the client tiup client which is recommended on https://docs.pingcap.com/tidb/stable/quick-start-with-tidb

The following error is returned:

my:root@127.0.0.1:4000=> SET tidb_dml_batch_size = 20000;
SET
my:root@127.0.0.1:4000=> LOAD DATA LOCAL INFILE '2017Q1-capitalbikeshare-tripdata.csv' INTO TABLE trips
my:root@127.0.0.1:4000->   FIELDS TERMINATED BY ',' ENCLOSED BY '"'
my:root@127.0.0.1:4000->   LINES TERMINATED BY '\r\n'
my:root@127.0.0.1:4000->   IGNORE 1 LINES
my:root@127.0.0.1:4000-> (duration, start_date, end_date, start_station_number, start_station,
my:root@127.0.0.1:4000(> end_station_number, end_station, bike_number, member_type);
error: mysql: local file '2017Q1-capitalbikeshare-tripdata.csv' is not registered
  1. Describe your suggestion or addition.

This is because the tiup client does not support the file transfer parts of the MySQL protocol. It might be helpful to include a note on this page saying that it requires the real mysql client, or alternatively an example could be given with lightning as well.

(Ideally lightning wouldn't require so many setup steps, since that makes it hard to use as a quickstart.)

  1. Provide some reference materials (documents, websites, etc) if you could.

Metadata

Metadata

Labels

area/migrateIndicates that the Issue or PR belongs to the area of TiDB migration tools.trackedThis issue has been tracked.type/bugfixThis PR fixes a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions