Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 12, 2004, 6:19 pm
rate this thread
I have an app that creates a text file of ip addresses, in text format, 1 ip
per line, i.e.
I am trying to get MySQL to dump out info from the db in the same format,
however, it creates the file with each address on 1 line, i.e.
10.10.10.10|10.10.10.15|10.10.10.20|etc <-- note the | character is a tab
in the output file
I use a batch file to run mysql from the command line, which calls the SQL
statement from an external file.
mysql -hlocalhost -uroot -ppassword --database=db < ip.sql
//contents of ip.sql
SELECT ip INTO OUTFILE 'ip_dump.txt' FROM iptable
Any ideas ? Missing mysql parameters ?
Re: MySQL and OUTFILE
I was able to use LINES TERMINATED BY and line breaks were created, however,
I have a new problem now.
The original file is created via WriteLine and each entry is on its own
line, and is read in via ReadLine. The MySQL text file, even though it
contains \n's, doesn't read properly into the .NET app.
So, I need to update the .NET app now to correctly handle \n's instead of
relying on each entry on its own line. Argh.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum