MySQL Access Control and Security


  1. The value of event_scheduler that enables checking status but not changing it at runtime is ______________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    In MySQL, if the event_scheduler is set to ‘DISABLED’ at startup, its status cannot be changed but can be checked at runtime. The events can be created but they will not execute.


  1. How can the value of recently generated sequence number be obtained?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The value of most recently generated sequence number can be obtained by calling the LAST_INSERT_ID() function. This enables to reference the AUTO_INCREMENT value in the subsequent statement.



  1. What does LAST_INSERT_ID() return when no AUTO_INCREMENT value has been generated during the current connection?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The ‘LAST_INSERT_ID()’ function returns zero when no ‘AUTO_INCREMENT’ value has been generated during the current connection with the server. It is tied to the current connection.


  1. Triggers are not supported for _____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In MySQL, the triggers are run only after the table modifications like insert, update and delete are run. Triggers are not supported for views. In order to create a trigger, the CREATE TRIGGER statement is used.



  1. Triggers and events are not invoked automatically by the server.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The triggers and events are invoked automatically by the server, so the concept of invoking user is not applied. Thus, they have no SQL SECURITY characteristic and always execute with definer privileges.