Avatar of johnyu1997
johnyu1997 asked on

output file location

If I have the mysql server on window xp, I try to export a table to a csv file.  If I run a query like

select * from <table_name> into outfile 'test.csv',

where does the file go?  On Linux, I can find it.  But on window,  I just cannot find it.  I know it is on the server side.  The file is successfully made but just can't find it.
JavaScriptMySQL Server

Avatar of undefined
Last Comment

8/22/2022 - Mon

It's probably in the data directory:

C:\ProgramData\MySQL\MySQL Server 5.1\data

I did a whole search on all my drives in the server and I found nothing.  But when I run the script again, it says the file already exists.

are you running the mysql command on your computer or the server?  if you have mysql installed on your computer then it will be on your computer! :)
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

I did a full search on the client side also too but just can't find it.

And you're searching hidden locations.  The path I posted above is in a hidden directory "ProgramData"

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

It says it can't read and write to c drive but it can write to my data drive.  Anyway, it works.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Good to hear. There's only so long I can bang my head against the wall before I just walk around it.... :-)