nerdexam
Oracle

1Z0-909 · Question #56

Examine this statement and output: What causes the error?

The correct answer is D. The database server process does not have sufficient privilege. Option D is correct because LOAD DATA INFILE causes the MySQL server process (typically running as the OS user mysql) to read the specified file directly from the server's filesystem. If the OS-level file permissions deny read access to that system user, MySQL throws an…

Security

Question

Examine this statement and output:

What causes the error?

Options

  • AThe engine is disabled.
  • BThe set local_infile option has not been enabled.
  • CThe database user does not have sufficient privilege.
  • DThe database server process does not have sufficient privilege.
  • EThe database client process does not have sufficient privilege.
  • FThe database server is running in read-only mode.

How the community answered

(62 responses)
  • A
    3% (2)
  • B
    13% (8)
  • C
    2% (1)
  • D
    76% (47)
  • E
    2% (1)
  • F
    5% (3)

Explanation

Option D is correct because LOAD DATA INFILE causes the MySQL server process (typically running as the OS user mysql) to read the specified file directly from the server's filesystem. If the OS-level file permissions deny read access to that system user, MySQL throws an OS-level "Permission denied" error (errno 13), regardless of what the SQL user is allowed to do.

Why the distractors are wrong:

  • A - The storage engine has no bearing on the server's ability to read a file from the filesystem.
  • B - local_infile is only relevant for LOAD DATA **LOCAL** INFILE (client-side loading); a standard LOAD DATA INFILE doesn't use it, and the error would explicitly mention local_infile being disabled.
  • C - Insufficient SQL-level FILE privilege produces a MySQL access-denied error in the SQL layer, not an OS-level permission error; the error message wording is distinct.
  • E - The client process doesn't touch the file in non-LOCAL mode; only the server process reads it, so client OS permissions are irrelevant here.
  • F - Read-only mode blocks INSERT/UPDATE/DELETE on tables, not the act of the server reading a file from disk.

Memory tip: Ask yourself "Who physically opens the file?" - for LOAD DATA INFILE, it's the server daemon, so think server OS permissions, not SQL privileges or client permissions.

Topics

#LOCAL_INFILE#file permissions#server process privileges#privilege hierarchy

Community Discussion

No community discussion yet for this question.

Full 1Z0-909 Practice