LOAD DATA INFILE on remote machine

前端 未结 2 1021
情深已故
情深已故 2021-02-04 02:04

How would I do the following command, with a local file, on a remote database (different machine) ?

$MYSQL_PATH/mysql -u root -h remote.net files -e \"
    LOAD          


        
相关标签:
2条回答
  • 2021-02-04 02:36

    LOAD DATA INFILE loads a file on machine the MySQL server is running on.

    Use LOAD DATA LOCAL INFILE to load a file located on your client machine.

    0 讨论(0)
  • 2021-02-04 02:42

    Don't forget to include --local-infile=1 when doing this:

    $MYSQL_PATH/mysql -u root -h remote.net files --local-infile=1 -e "
        LOAD DATA LOCAL INFILE...
    
    0 讨论(0)
提交回复
热议问题