Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2014

    Unanswered: Exporting contents of db to text file

    I am accessing mysql server using ssh and i wanted to export contents of a table named Random for only ids equal to 100

    so i wrote this command in mysql

    select * from Random WHERE id ='100' INTO OUTFILE '/homes/username/details.txt';

    Is this statement wrong ?Or is there something wrong in the way path is defined?

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    My guess is that your outfile path is invalid, possibly because of the "s" in "homes" since that is close to a common, valid value.

    SQL Fiddle likes your syntax, so that isn't a problem.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts