Re: INTO OUTFILE ERROR...

2014-09-22 Thread Reindl Harald
LEGES" why in the world did i post the link to the answer last friday if people are too lazy to read GRANT FILE ON *.* TO 'asdfsdf'@'localhost'; is a global setting because you access *the hosts FILESYSTEM* with it http://lmgtfy.com/?q=mysql+permissions+into+outfile http://stackoverflow.com/questions/6091427/mysql-into-outfile-access-denied-but-my-user-has-all-access-and-the-fold signature.asc Description: OpenPGP digital signature

Re: INTO OUTFILE ERROR...

2014-09-22 Thread william drescher
On 9/19/2014 10:59 AM, Don Wieland wrote: On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote: the target folder don't matter that is clearly a *MySQL error* that your *MYSQL user* lack the needed permissions Yes i figured that - so the question is, how do I give full permissions to that user?

Re: INTO OUTFILE ERROR...

2014-09-21 Thread Divesh Kamra
room_id > JOIN tl_users u on u.user_id = apt.user_id > > WHERE > > apt.time_start between '1388552400' and '1420088399' > and r.location_id = '1' > > GROUP BY u.user_id, c.client_id > having count(*) > 1 > > ORDER BY u.first_nam

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Mogens Melander
Maybe you need to grant access from localhost to the user? On Fri, September 19, 2014 16:59, Don Wieland wrote: > On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote: > >> the target folder don't matter >> that is clearly a *MySQL error* that your *MYSQL user* lack the needed >> permissions > > Yes i

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
On Sep 19, 2014, at 9:11 AM, Christophe wrote: > Don't you have root access to MySQL instance ? I guess not, I am using a managed server VPSLatch. I chatted with them and they are going to GRANT the permissions I need…at least that is what the tech said. I waiting with baited breath ;oP Thanks

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Christophe
Le 19/09/2014 18:00, Christophe a écrit : Hi there, Le 19/09/2014 17:19, Don Wieland a écrit : grant all privileges on teal1dwd_teal.* to 'teal1dwd_teal'@'localhost' identified by 'my_user_pw'; I get this error: #1044 - Access denied for user 'teal1dwd'@'localhost' to database 'teal

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Christophe
Hi there, Le 19/09/2014 17:19, Don Wieland a écrit : grant all privileges on teal1dwd_teal.* to 'teal1dwd_teal'@'localhost' identified by 'my_user_pw'; I get this error: #1044 - Access denied for user 'teal1dwd'@'localhost' to database 'teal1dwd_teal' I think you are trying to ac

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
@'localhost' to database 'teal1dwd_teal' Do I need to perform this query in a different place? Sigh… Don On Sep 19, 2014, at 8:03 AM, Reindl Harald wrote: > "into outfile" is *not* a db-specific permission > > http://lmgtfy.com/?q=mysql+permissions+into

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Reindl Harald
the question is, how do I give full permissions to > that user? > > I did go to my cPanel and delete the user and recreated the user adding them > to the DB with ALL PRIVILEGES. > Obviously this is not enough. "into outfile" is *not* a db-specific permission http://lmgtfy.co

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote: > the target folder don't matter > that is clearly a *MySQL error* that your *MYSQL user* lack the needed > permissions Yes i figured that - so the question is, how do I give full permissions to that user? I did go to my cPanel and delete the u

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Reindl Harald
room_id = apt.room_id > JOIN tl_users u on u.user_id = apt.user_id > > WHERE > > apt.time_start between '1388552400' and '1420088399' > and r.location_id = '1' > > GROUP BY u.user_id, c.client_id > having count(*) > 1 > > ORDER BY u.fi

INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
oom_id = apt.room_id JOIN tl_users u on u.user_id = apt.user_id WHERE apt.time_start between '1388552400' and '1420088399' and r.location_id = '1' GROUP BY u.user_id, c.client_id having count(*) > 1 ORDER BY u.first_name, u.last_name, c.last_name, c.fi

Re: Mysql into outfile problem

2014-02-19 Thread Carsten Pedersen
I don't know what you mean by "straight" mysql connection. At any rate, the idea is to use --quick or otherwise using a connection which uses mysql_use_result over mysql_store_result. http://dev.mysql.com/doc/refman/5.6/en/mysql.html Best, / Carsten On 19-02-2014 12:02, Machiel Richards wrot

Re: Mysql into outfile problem

2014-02-19 Thread Johan De Meersman
- Original Message - > From: "Machiel Richards" > Subject: Re: Mysql into outfile problem > > I have checked now and there is nothing in the Slow logs. It may be turned off, then. Depending on your version you can change the settings without having to restart th

Re: Mysql into outfile problem

2014-02-19 Thread Machiel Richards
I have checked now and there is nothing in the Slow logs. On 19/02/2014 15:33, Johan De Meersman wrote: - Original Message - From: "Machiel Richards" Subject: Mysql into outfile problem - when we run an explain on the query it shows that it is using index

Re: Mysql into outfile problem

2014-02-19 Thread Johan De Meersman
- Original Message - > From: "Machiel Richards" > Subject: Mysql into outfile problem > > - when we run an explain on the query it shows that it is > using indexes and the amount of rows it accesses is about 165000 rows > out of a 90mil+ rows t

Re: Mysql into outfile problem

2014-02-19 Thread Machiel Richards
Hi, the queries are done by connecting to the database using mysql workbench or otherwise after ssh to server by using straight mysql connection. regards On 19/02/2014 12:51, Carsten Pedersen wrote: If you're doing this from the cmd-line client, try running it using --quick. th Best,

Re: Mysql into outfile problem

2014-02-19 Thread Carsten Pedersen
If you're doing this from the cmd-line client, try running it using --quick. Best, / Carsten On 19-02-2014 09:03, Machiel Richards wrote: Hi guys I am hoping that someone might have experienced this before or might know why we are getting this. We regularly need to run some quer

Mysql into outfile problem

2014-02-19 Thread Machiel Richards
Hi guys I am hoping that someone might have experienced this before or might know why we are getting this. We regularly need to run some queries and export the results to a csv file. However we seem to be experiencing the following issues: - when we run an exp

Re: How do I use a dynamic filename for an into outfile statement

2012-03-01 Thread Paul DuBois
s missing software) > > select last_logon.host_name_short > from last_logon > left join mcafee on last_logon.host_name_short = last_logon.host_name_short > where mcafee.host_name_short is null > and last_logon.host_name_short like 'w%' > -- the above works > into out

Re: How do I use a dynamic filename for an into outfile statement

2012-03-01 Thread Johan De Meersman
By using your shell's variable substitution, I'm afraid. export outfile='/path/to/file' mysql -e "select blah into outfile '$outfile'" You'll have to build a shell script or something that generates your filename, and then do an interactive ca

Re: How do I use a dynamic filename for an into outfile statement

2012-03-01 Thread Hal�sz S�ndor
lt;<< Look up the command! http://dev.mysql.com/doc/refman/5.5/en/select.html Aside from PREPARE, the OUTFILE-name does not automate. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

How do I use a dynamic filename for an into outfile statement

2012-02-29 Thread Ed Patterson
mcafee on last_logon.host_name_short = last_logon.host_name_short where mcafee.host_name_short is null and last_logon.host_name_short like 'w%' -- the above works into outfile (select concat('Missing-',date_format(now(),'%Y%m%d%H%i'),'txt'); -- this line break

Re: select ... into local outfile ... ???

2011-09-03 Thread Hal�sz S�ndor
2011/09/03 03:40 +0800, Dennis But it seems that there is no "select ... into LOCAL file" statement. Any suggestion is appreciated. Indeed: you can use only standard output. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: select ... into local outfile ... ???

2011-09-03 Thread Dennis
Thanks, Tyler,  That's very helpful. Dennis --- On Sat, 9/3/11, Tyler Poland wrote: From: Tyler Poland Subject: Re: select ... into local outfile ... ??? To: mysql@lists.mysql.com Date: Saturday, September 3, 2011, 3:45 AM Dennis, The following closely simulates the default "IN

Re: select ... into local outfile ... ???

2011-09-02 Thread Tyler Poland
Dennis, The following closely simulates the default "INTO OUTFILE", you'll have to modify it slightly for your purposes: mysql --delimiter=comma -N < select_statement.sql \ | sed 's/\"/\\\"/g' \ | sed 's/\t/\",\"/g' \ | sed &

select ... into local outfile ... ???

2011-09-02 Thread Dennis
hi, there, the following is my sql statement: SELECT   HIGH_PRIORITY   SQL_BIG_RESULT   SQL_NO_CACHE   tb.url_sign,  m_url,    m_title,   m_weight    INTO OUTFILE   '/tmp/a.csv'  FIELDS TERMINATED BY ','  ENCLOSED BY '\"'   LINES  TERMINATED BY '\n' STARTING BY '=' FROM d_lo

Re: Permissions and Into Outfile

2010-07-09 Thread Tong Anh Quan
Hi all, >From the manual: *Any file created by INTO OUTFILE or INTO DUMPFILE is writable by all users on the server host. The reason for this is that the MySQL server cannot create a file that is owned by anyone other than the user under whose account it is running. (You should never run mys

Re: Select Into OUTFILE problem

2009-05-14 Thread Bruce Ferrell
Thanks all who replied. After I posted I kept looking and found it... Also had folks point it out to me. Your suggestion is what I ended up doing. Bruce Gavin Towey wrote: > Hi Bruce, > > > > SELECT … INTO OUTFILE always creates the file local to the database > serve

RE: Select Into OUTFILE problem

2009-05-14 Thread Gavin Towey
Hi Bruce, SELECT ... INTO OUTFILE always creates the file local to the database server. If you want to dump results where your perl script is running you'll have to use another method such as receiving the results of the query normally and writing the file in the perl script. Re

Select Into OUTFILE problem

2009-05-13 Thread Bruce Ferrell
I have a bit of perl code that ends with an error: $sql="SELECT convert_tz( a.stamp,'GMT','$tz' ) as ts, a.status, a.reason, a.tl INTO OUTFILE '/application/result.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '\&qu

select into outfile php problem

2008-10-20 Thread kalin m
hi all... i have a strange problem with a simple script that is doing select into outfile... the thing just does that. it does a select into an outfile. if i print the query that's passed to mysql_result in the script and then copy it and paste it z`into the mysql client it works fin

Re: select ... into outfile=stdout ?

2008-10-20 Thread Moon's Father
e same meaning as > the corresponding clauses for LOAD DATA INFILE. See Section 12.2.6, "LOAD > DATA INFILE Syntax". > >> > >> By default, its output to stdout. > >> > >> Give it a try !!! > >> > >> -Original Message- > &

Re: select ... into outfile=stdout ?

2008-10-19 Thread walter harms
> >> -Original Message----- >> From: walter harms [mailto:[EMAIL PROTECTED] >> Sent: Thursday, October 16, 2008 5:06 AM >> To: 'mysql' >> Subject: select ... into outfile=stdout ? >> >> hi list, >> i need some options from outfile (exspec

Re: select ... into outfile=stdout ?

2008-10-19 Thread walter harms
By default, its output to stdout. > > Give it a try !!! > > -Original Message- > From: walter harms [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 16, 2008 5:06 AM > To: 'mysql' > Subject: select ... into outfile=stdout ? > > hi list, > i need some options

RE: select ... into outfile=stdout ?

2008-10-16 Thread Rolando Edwards
x27; Subject: select ... into outfile=stdout ? hi list, i need some options from outfile (exspecialy:FIELDS TERMINATED BY) and would like to send the output to stdout to further processing. unfortunately i found no proper way to force the output to stdout. for now i use the redirection of the &q

select ... into outfile=stdout ?

2008-10-16 Thread walter harms
hi list, i need some options from outfile (exspecialy:FIELDS TERMINATED BY) and would like to send the output to stdout to further processing. unfortunately i found no proper way to force the output to stdout. for now i use the redirection of the "mysql -NB" output but the interface

Re: how to escape new lines using select * into outfile

2008-05-13 Thread Saravanan
pe new lines using select * into outfile > To: [EMAIL PROTECTED] > Cc: mysql@lists.mysql.com > Date: Wednesday, May 14, 2008, 1:35 AM > Try using: > > select * into outfile 'filename.csv' fields > enclosed by '"' terminated by > ',' lines

Re: how to escape new lines using select * into outfile

2008-05-13 Thread Velen
Try using: select * into outfile 'filename.csv' fields enclosed by '"' terminated by ',' lines terminated by '\n' from table Regards, Velen - Original Message - From: "Saravanan" <[EMAIL PROTECTED]> To: "mysql"

RE: how to escape new lines using select * into outfile

2008-05-13 Thread Jerry Schwartz
mysql >Subject: how to escape new lines using select * into outfile > >Hi all, > >I want to export the values based on the condition. I export them as >csv. > >select * into outfile 'filename.csv' from table; > >the problem is one field in table has many lines, m

how to escape new lines using select * into outfile

2008-05-13 Thread Saravanan
Hi all, I want to export the values based on the condition. I export them as csv. select * into outfile 'filename.csv' from table; the problem is one field in table has many lines, means with \n. I couldn't import the values into the xls sheet. any ideas how to escape the new

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Jed Reynolds
: mysqldump: Got error: 1: Can't create/write to file '/dump1/red1_p2.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' I'm reading thru http://dev.mysql.com/doc/refman/5.0/en/select.html and it says that it will not write to an already existing file (so

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Mike Spreitzer
te to file '/dump1/red1_p2.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' [EMAIL PROTECTED] /]# ls -l dump1 total 8 -rw-r--r-- 1 root root 742 Feb 22 20:46 red1_p2.sql [EMAIL PROTECTED] /]# ps axlw | grep mysqld 0 0 8494 1 25 0 3408 944 wait Spts/

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Jed Reynolds
what happens when you delete the files that are already in there? Looks like you're dumping to a file owned by root. Jed -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Mike Spreitzer
ed1_p2.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' [EMAIL PROTECTED] /]# ls -ld /dump1 drwxrwxrwx 2 mysql mysql 4096 Feb 22 19:11 /dump1 [EMAIL PROTECTED] /]# ls -l /dump1 total 16 -rw-r--r-- 1 mysql mysql 29 Feb 22 18:38 foo.bar -rw-r--r-- 1 root root 742 Feb 22

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Jed Reynolds
Mike Spreitzer wrote: So I am trying to use mysqldump --tab for the first time. I am running into the same problem everybody does on their first try --- Errcode: 13. I have set the permissions on the target directory to be completely liberal --- anybody can do anything with it --- and I still

mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Mike Spreitzer
So I am trying to use mysqldump --tab for the first time. I am running into the same problem everybody does on their first try --- Errcode: 13. I have set the permissions on the target directory to be completely liberal --- anybody can do anything with it --- and I still get Errcode: 13. I ca

regarding outfile

2007-12-21 Thread VEERABHADRA
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Permissions and Into Outfile

2007-04-28 Thread John Kebbel
Thank you. It's working now. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Permissions and Into Outfile

2007-04-28 Thread Mogens Melander
Ok, on my linux (slackware 10) /var/www is owner by root.root with permissions rwxr-xr-x (755). Say you want mysql to put your data in a subdirectory under /var/www named data. As root, do: mkdir /var/www/data chgrp mysql /var/www/data chmod 775 /var/www/data Now mysql has write permissions to /

RE: Permissions and Into Outfile

2007-04-27 Thread John Kebbel
I experimented with a local /var/www folder. I assumed setting 2, 6, or 7 for the Other value would give mysql write privileges, but mysql would not settle for anything less than a 7 in that last slot. What was really curious to me was that the User and Group settings were inconsequential. I even s

RE: Permissions and Into Outfile

2007-04-27 Thread Mogens Melander
ctory to some other folder? > >> -- >> From:Gerald L. Clark >> Sent:Friday, April 27, 2007 10:09 AM >> To: Kebbel, John >> Cc: mysql@lists.mysql.com >> Subject: Re: Permissions and Into Outfile >> >> Kebbel, John wrote: >> >

Re: Permissions and Into Outfile

2007-04-27 Thread Gerald L. Clark
Kebbel, John wrote: cat /etc/passwd on my Macintosh 10.3 at work (I'm using Linux at home) shows me this for mysql ... mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false The home directory for mysql is /var/empty, which does exist. Should I write ~into file~ output to this folder or should

RE: Permissions and Into Outfile

2007-04-27 Thread Kebbel, John
mysql home directory to some other folder? > -- > From: Gerald L. Clark > Sent: Friday, April 27, 2007 10:09 AM > To: Kebbel, John > Cc: mysql@lists.mysql.com > Subject: Re: Permissions and Into Outfile > > Kebbel, John wrote: > > I

Re: Permissions and Into Outfile

2007-04-27 Thread Gerald L. Clark
sketball, 9SDrama, 9SDriverEd1, 9SDriverEd2, 9SRecreation, 9STeamSports1, 9STeamSports2, 9SWeights into outfile '/tmp/srhs9.txt' from sched_students, SCHED_COURSES where (sched_students.id = SCHED_COURSES.id) and (grade = 8) order by lastname, firstname; The user 'mysql'

Permissions and Into Outfile

2007-04-27 Thread Kebbel, John
sketball, 9SDrama, 9SDriverEd1, 9SDriverEd2, 9SRecreation, 9STeamSports1, 9STeamSports2, 9SWeights into outfile '/tmp/srhs9.txt' from sched_students, SCHED_COURSES where (sched_students.id = SCHED_COURSES.id) and (grade = 8) order by lastname, firstname; -- MyS

RE: Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
ginal Message- From: Jerry Schwartz [mailto:[EMAIL PROTECTED] Sent: Monday, March 26, 2007 12:06 PM To: 'David Ruggles'; mysql@lists.mysql.com Subject: RE: Select into outfile on nfs mount point Can you "touch" the file name? It might be a permission issue at the dire

RE: Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
, March 26, 2007 12:37 PM To: David Ruggles Subject: RE: Select into outfile on nfs mount point >>> Date: Monday, March 26, 2007 11:50:59 AM -0400 >>> From: David Ruggles <[EMAIL PROTECTED]> >>> To: mysql@lists.mysql.com >>> Subject: Select into outfile

RE: Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
ECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 26, 2007 12:01 PM To: David Ruggles Subject: Re: Select into outfile on nfs mount point the file on the mount point has to be able to be created, and read/write by the user that is invoking the mysql call. e.g., if this is begin done at the comman

RE: Select into outfile on nfs mount point

2007-03-26 Thread Jerry Schwartz
m: David Ruggles [mailto:[EMAIL PROTECTED] > Sent: Monday, March 26, 2007 11:51 AM > To: mysql@lists.mysql.com > Subject: Select into outfile on nfs mount point > > I'm unable to select into an outfile, the path is in an nfs > mount point. I'm > sure it's some s

Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
I'm unable to select into an outfile, the path is in an nfs mount point. I'm sure it's some sort of permissions issue or something, but I can't figure it out. I've googled everything I can think of and haven't found anything. Any help or suggestions would be great

Re: SELECT data FROM two tables into outfile

2007-02-05 Thread Rolando Edwards
SELECT header.date_in,header.pid,header.status,body.body_data into outfile '/tmp/mysql/117070515226878' from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid ; - Original Message -

SELECT data FROM two tables into outfile

2007-02-05 Thread List User
Hello list: Need some help with the following query: mysql> SELECT header.date_in,header.pid,header.status,body.body_data from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid into outfile '/t

Re: Charset for SELECT ... INTO OUTFILE

2006-10-09 Thread Visolve DB Team
er 09, 2006 2:23 PM Subject: Charset for SELECT ... INTO OUTFILE > Hi, > > I have a database where the database character set is utf-8 and some rows > are ascii. > > I want to save the results of some queries, and SELECT ... INTO OUTFILE > looks like an easy way to do it. But I n

Charset for SELECT ... INTO OUTFILE

2006-10-09 Thread imre
Hi, I have a database where the database character set is utf-8 and some rows are ascii. I want to save the results of some queries, and SELECT ... INTO OUTFILE looks like an easy way to do it. But I need the output in ucs-2. Is there any way to specify the charset for SELECT ... INTO OUTFILE

Re: Outfile syntax and out of memory

2006-05-08 Thread Jeremy Cole
Hi Johan, I need to extract some data to a textfile from a big database. If I try to do like this: mysql < queryfile.sql > outfile.txt "outfile.txt" it looks something like: "OrderID", "Quant", "OrdrDate", "code1", "code2"... 10021, 12, 20060412, 23, 95... 10022, 5, 20060412, , 75... But, I

Re: Outfile syntax and out of memory

2006-05-08 Thread Johan Lundqvist
ething like: "OrderID", "Quant", "OrdrDate", "code1", "code2"... 10021, 12, 20060412, 23, 95... 10022, 5, 20060412, , 75... But, I never get a complete file. I get a out of memory error after a hour or 2!! If I instead insert the following code in qu

Re: Outfile syntax and out of memory

2006-05-08 Thread Johan Lundqvist
Hi George, To do it incrementally is not really an option, since i have to run it as a script during a short time-frame every night, and theres simply not time to process the files. The outfile is about 2 - 10 Gb every time. The tables have about 100 - 180 columns, and to do a COALESCE

RE: Outfile syntax and out of memory

2006-05-08 Thread George Law
al Message- From: Johan Lundqvist [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 10:16 AM To: mysql@lists.mysql.com Subject: Outfile syntax and out of memory Hi, I need to extract some data to a textfile from a big database. If I try to do like this: mysql < queryfile.sql

Re: Outfile syntax and out of memory

2006-05-08 Thread Dilipkumar
after a hour or 2!! If I instead insert the following code in queryfile.sql: "INTO OUTFILE 'outfile.txt'" Now my outfile.txt don't get the first row with the column names, and any NULL values are exported as "\N". This is a big problem, cause the import

Outfile syntax and out of memory

2006-05-08 Thread Johan Lundqvist
12, 20060412, 23, 95... 10022, 5, 20060412, , 75... But, I never get a complete file. I get a out of memory error after a hour or 2!! If I instead insert the following code in queryfile.sql: "INTO OUTFILE 'outfile.txt'" Now my outfile.txt don't get the first row with

RE: ~problem with select into outfile~

2006-04-13 Thread Addison, Mark
From: Mohammed Abdul Azeem Sent: 13 April 2006 07:29 > > Hi > > Iam having a problem using "select into outfile" command, iam getting > the following error. can anyone help me trace the problem. > > mysql> SELECT * INTO OUTFILE'/home/public1/data.txt&#x

~problem with select into outfile~

2006-04-12 Thread Mohammed Abdul Azeem
Hi Iam having a problem using "select into outfile" command, iam getting the following error. can anyone help me trace the problem. mysql> SELECT * INTO OUTFILE'/home/public1/data.txt' FROM temp_table WHERE last_time_update = "2006-04-01"; ERROR 1 (HY000):

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-02 Thread C.R.Vegelin
Thanks Jorrit, Yes, it is a combi of Paul's suggestion to use IFNULL() with the ENCLOSED BY '' option. So when using: Select IFNULL(Jan,''), IFNULL(Feb,''), ... Into Outfile ... Fields Terminated By ';' Enclosed By '' Escaped By ''

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-02 Thread Jorrit Kronjee
;[EMAIL PROTECTED]> To: "C.R.Vegelin" <[EMAIL PROTECTED]>; Sent: Saturday, April 01, 2006 6:11 PM Subject: Re: how to suppress NULL values in SELECT ... INTO OUTFILE ? At 13:29 +0100 4/1/06, C.R.Vegelin wrote: Hi everyone, I am struggling to make a CSV file, with rows like:

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-01 Thread C.R.Vegelin
o extend the FIELDS options to enable this ... Regards, Cor - Original Message - From: "Paul DuBois" <[EMAIL PROTECTED]> To: "C.R.Vegelin" <[EMAIL PROTECTED]>; Sent: Saturday, April 01, 2006 6:11 PM Subject: Re: how to suppress NULL values in SELECT ... IN

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-01 Thread Paul DuBois
At 13:29 +0100 4/1/06, C.R.Vegelin wrote: Hi everyone, I am struggling to make a CSV file, with rows like: 1;2;;4;;2;9 where NULL values are suppressed in the CSV file. I tried the following alternatives: a) Select ... Into Outfile ... Fields Terminated By ';' Escaped By ''

how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-01 Thread C.R.Vegelin
Hi everyone, I am struggling to make a CSV file, with rows like: 1;2;;4;;2;9 where NULL values are suppressed in the CSV file. I tried the following alternatives: a) Select ... Into Outfile ... Fields Terminated By ';' Escaped By '' Lines Terminated By '\r\n&#x

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread Jake Peavy
EMAIL PROTECTED]> wrote: > > > > > > > Hi Ariel, > > > > > > > > Maybe this example helps you to create CSV output from MySQL. > > > > The first SELECT generates the headerline; the second the data. > > > > ( SELECT 'Fi

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread SGreen
is example helps you to create CSV output from MySQL. > > > The first SELECT generates the headerline; the second the data. > > > ( SELECT 'FieldA','FieldB','FieldC', ... ) > > > UNION > > > ( SELECT `FieldA`, `FieldB`, `FieldC`, ... >

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread Jake Peavy
data. > > ( SELECT 'FieldA','FieldB','FieldC', ... ) > > UNION > > ( SELECT `FieldA`, `FieldB`, `FieldC`, ... > > INTO OUTFILE 'D:/MySQL Datafiles/myFile.csv' > > FIELDS TERMINATED BY ',' > > LINES TERMINATED BY

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-10 Thread Jake Peavy
.. ) > UNION > ( SELECT `FieldA`, `FieldB`, `FieldC`, ... > INTO OUTFILE 'D:/MySQL Datafiles/myFile.csv' > FIELDS TERMINATED BY ',' > LINES TERMINATED BY '\r\n' > FROM ... ... > GROUP BY `FieldA`, `FieldB`, `FieldC`, ... > ); > > Don't forget the

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread C.R.Vegelin
Hi Ariel, Maybe this example helps you to create CSV output from MySQL. The first SELECT generates the headerline; the second the data. ( SELECT 'FieldA','FieldB','FieldC', ... ) UNION ( SELECT `FieldA`, `FieldB`, `FieldC`, ... INTO OUTFILE 'D:/MySQL Datafile

RE: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Marciano [Intercol]
, 2006 5:12 PM To: mysql@lists.mysql.com Subject: 'Into outfile' doesn't include the column names. How can it be done? When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names in

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Paul DuBois
At 14:12 -0600 3/6/06, Ariel Sánchez Mora wrote: When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in th

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread SGreen
Ariel Sánchez Mora <[EMAIL PROTECTED]> wrote on 03/06/2006 03:12:20 PM: > When using select into outfile, I can only get the table data, but I > can't find how to include the column names. I haven't been able to > include the column names into the actual return of the

'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Ariel Sánchez Mora
When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in the .csv Anyone know how to include the column na

Re: Can't select to outfile

2006-03-02 Thread unplug
You have to enable the file_permission for the user in order to create file. On 3/3/06, Bruce Bales <[EMAIL PROTECTED]> wrote: > I'm using mysql 3.23.58 on linux. I recently upgraded from RedHat 9 to Fedora > 3 and now I am unable to write to an outfile. > > If I have

Can't select to outfile

2006-03-02 Thread Bruce Bales
I'm using mysql 3.23.58 on linux. I recently upgraded from RedHat 9 to Fedora 3 and now I am unable to write to an outfile. If I have started mysql with the simple "mysql" I get 'access denied' even if I am trying to put it into my home directory. mysql> select

including column name headers in OUTFILE output?

2006-02-08 Thread Ferindo Middleton Jr
If say something like the following from the mysql command line tool: SELECT * FROM dognames INTO OUTFILE 'C:/outfiles/dognames.tab'; How do I get mysql to include the column names in the file's output? Ferindo -- MySQL General Mailing List For list archives: http://lists.mys

Re: BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread Pat Adams
On Wed, 2005-08-24 at 10:11 -0300, Alejandro Gad wrote: > Hi, > > I am going to implement a mysql hosting, and I would to make a question, > if a mysql-user with only a "SELECT" privilege make this query: > > SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/tes

Re: BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread averyanov
Wednesday, August 24, 2005, 5:11:14 PM, you wrote: > Hi, > I am going to implement a mysql hosting, and I would to make a question, > if a mysql-user with only a "SELECT" privilege make this query: > SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql';

BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread Alejandro Gad
Hi, I am going to implement a mysql hosting, and I would to make a question, if a mysql-user with only a "SELECT" privilege make this query: SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql'; the result is a file in this path with the content of the table.

Re: SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread Michael Stassen
Thomas Spahni wrote: Hi suomi, it can be done with a temporary table. See the following example. Regards, Thomas Spahni CREATE TEMPORARY TABLE duptemp SELECT * FROM duprows WHERE id = 2; ALTER TABLE duptemp CHANGE id id INT NULL; UPDATE duptemp SET id = NULL; INSERT INTO duprows SELECT * F

Re: SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread Thomas Spahni
in the > same table. I got no answer, so there is no such syntax. > > now i meant to have found a work-around using (see subject). > > problem is, that when i do a SELECT * ... INTO OUTFILE .. i will also > catch the PRIMARY KEY column if there is one and the LOAD DATA INFILE >

RE: SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread Gordon Bruce
your PRIMARY KEY is an auto_increment field, just omit foo_ID from the columns list in both the INSERT and SELECT. -Original Message- From: suomi [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 7:08 AM To: mysql@lists.mysql.com Subject: SELECT ... INTO OUTFILE ... and LOAD DATA

SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread suomi
Hi listers I once asked if there is an SQL syntax permitting to copy a row in the same table. I got no answer, so there is no such syntax. now i meant to have found a work-around using (see subject). problem is, that when i do a SELECT * ... INTO OUTFILE .. i will also catch the PRIMARY KEY

RE: select into the same outfile repetitively

2005-01-06 Thread Jay Blanchard
[snip] Sometimes I need to execute 'select * into outfile '/tmp/t1.out' more than 1 times before I get the right result. But once mysql succeeds in writing t1.out, it does not overwrite it if the same sql command is executed for the 2nd time unless t1.out is removed. Is

select into the same outfile repetitively

2005-01-06 Thread Ginger Cheng
Hi, mysql Gurus, Sometimes I need to execute 'select * into outfile '/tmp/t1.out' more than 1 times before I get the right result. But once mysql succeeds in writing t1.out, it does not overwrite it if the same sql command is executed for the 2nd time unless t1.out is re

SELECT INTO OUTFILE with UNION

2004-12-23 Thread Lynn Bender
Greetings from Austin, TX: What is the proper syntax for SELECT INTO OUTFILE in a statement with a UNION keyword, like the following: SELECT Addresses FROM editors UNION SELECT Addresses FROM authors Thanks, Lynn Bender UnsubCentral Secure Email List

  1   2   3   >