George, this should be really clear:

mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A
  -e 'select chrom, chromStart, chromEnd, score, strand from 
nucleosomeFragmentsSense ' > dump.txt

Except that this is all really in one single line.
The email system will probably break it into multiple
lines in this message.

There are probably some other tricks too,
but this should be adequate.

-Galt


On Fri, 28 Aug 2009, Galt Barber wrote:

>
> http://dev.mysql.com/doc/refman/5.0/en/select.html
>
> The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected
> rows to a file. The file is created on the server host, so you must have
> the FILE privilege to use this syntax.
>
> If you want to create the resulting file on some client host other than
> the server host, you cannot use SELECT ... INTO OUTFILE. In that case, you
> should instead use a command such as
>
> mysql -e "SELECT ..." >  file_name
>
> to generate the file on the client host.
>
>  -Galt
>
>
> On Fri, 28 Aug 2009, GEORGE LOCKE wrote:
>
>> Hi,
>>
>> I'm a grad student at Rutgers trying to get access to data from the genome
>> browser mysql database.  I'm doing research in nucleosome positioning with
>> Prof. Alex Morozov.
>>
>> i logged on as suggested, mysql --user=genome
>> --host=genome-mysql.cse.ucsc.edu -A
>>
>> this is the query I wish to execute:
>> select chrom, chromStart, chromEnd, score, strand from
>> nucleosomeFragmentsSense into outfile "dump.txt";
>> (using database ce4)
>>
>> this is the error i get: ERROR 1045 (28000): Access denied for user
>> 'genome'@'%' (using password: NO)
>>
>> what can I do?  I can't find this information in text format anywhere and
>> hoped I could just get it direct from the database but have been rebuffed.
>>
>> Regards,
>> George
>>
>> _______________________________________________
>> Genome maillist  -  [email protected]
>> https://lists.soe.ucsc.edu/mailman/listinfo/genome
>>
> _______________________________________________
> Genome maillist  -  [email protected]
> https://lists.soe.ucsc.edu/mailman/listinfo/genome
>
_______________________________________________
Genome maillist  -  [email protected]
https://lists.soe.ucsc.edu/mailman/listinfo/genome

Reply via email to