Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MySQL, loading data into a table from a textfile problem

  • 17-10-2007 5:59pm
    #1
    Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭


    I'm trying to populate a table using a text file. For the life of me I can not find why it is not working.
    Here is what I write:

    mysql> LOAD DATA LOCAL INFILE 'C:/Documents and Settings/Paul/Desktop/active.txt'
    INTO TABLE active;
    ERROR 2 (HY000): File 'C:\DocumentsandSettings\Paul\Desktop\active.txt' not found (Errcode: 2)

    Anybody know how to fix this rather trivial thing?
    I have no idea why it can not find a file no matter what I do.


Comments

  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    Quick fix, through the file to the C drive and then amend the file path and it will work

    The answer is to the \ before spaces in Documents And Settings to make it work


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    Hi, the first thing I tried was putting it in the c drive and it still did not work. File could still not be found. I don't follow your seond sentence, the spaces in Documents And Settings are the problem?


  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    'C:/Documents\ and\ Settings/Paul/Desktop/active.txt'

    Should do it I think, its been a very long time since i used mySQL


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    Thanks mate, I fixed it. It was odd, I changed the name of the file and it worked...
    Anywy, cheers for the help.


Advertisement