Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, Can some one tell why the file is failed to open? Code: mysql> \. /home/Scripts/Log/42.sql ERROR: Failed to open file 'home/Scripts/Log/42.sql', error: 2 mysql>...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42

    Failed to open file 'home/Scripts/Log/42.sql', error: 2

    Hi,

    Can some one tell why the file is failed to open?

    Code:
    mysql> \. /home/Scripts/Log/42.sql
    ERROR:
    Failed to open file 'home/Scripts/Log/42.sql', error: 2
    mysql>

  2. #2
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    I even checked the permission for that file in that folder

    Code:
    myserver:/home # l -lrth
    drwxrwxrwx  3 root  root  4.0K 2008-02-04 09:29 Scripts/
    Code:
    myserver:/home # cd /home/Scripts/
    myserver:/home/Scripts/ # l -lrth
    drwxrwxrwx  3 root  root  4.0K 2008-02-04 09:29 Log/
    I even have full rights to access the folder and the sub-folder

    But when i execute a DB Script file,

    Code:
    mysql> \. /home/Scripts/Log/42.sql
    ERROR:
    Failed to open file 'home/Scripts/Log/42.sql', error: 2
    mysql>
    But When i copy the same file to the home and tried,

    Code:
    myserver:/home/Scripts/Log # 42.sql /home/
    mysql> \. /home/42.sql
    Executed Successfully !!!!!!!
    I could not understand the Issue here?
    Some one here can help me ?

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    Some one here to help me ?

  4. #4
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    Got the solution,

    But this is an alternative one,

    Code:
    mysql> SOURCE /home/Scripts/Log/42.sql
    Executed Successfully !!!!!
    mysql>
    Thanks for all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...