Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading scripts.......from where?

Status
Not open for further replies.

vevense

Technical User
Jan 8, 2004
2
NO
Hello!
I am new to mySQL and have a problem with a tutorial.
I have created a file "pet.txt" with records that should be inserted into the table pet in my database.
When I write LOAD DATA LOCAL INFILE "pet.txt" INTO TABLE pet; at the mysql-promt I just get the result that the file is not found. I have tried to place the file in several locations (included "scripts"), but have not succeded yet. Where shall I place the file?

I am running WinXP and the mysql-dir is C:\mysql

Best regards
Vidar
 
First, if the file resides on the filesystem of the server where MySQL resides, drop the "LOCAL" keyword.

From there, the pathname to the file is relative to the directory from which you invoked the mysql command-line app.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thank You, sleipnir214!

When I cut "local" i get the response: "Access denied". I am still allowed to insert rows using insert into...

What can be wrong?

Vidar
 
is there any system of file protection in unix i.e if no permission user cannot view it



[ponder]
----------------
ur feedback is a very welcome desire
 
besides u probably might not have FILE permission. Try
Code:
GRANT FILE  ON dbname.* to TO <user@clentid>



[ponder]
----------------
ur feedback is a very welcome desire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top