MySQL AI  /  AI-Powered Search and Content Generation  /  Required Privileges for using GenAI

5.3 Required Privileges for using GenAI

To perform the following GenAI functions, ask the admin user to grant you the required privileges:

  • To create a vector store, the FILE privilege is required:

    mysql> GRANT FILE ON *.* TO 'user_name'@'%';
  • To run the batch queries using ML_GENERATE_TABLE, ML_RAG_TABLE, and ML_EMBED_TABLE, the following privileges are required:

    • SELECT and ALTER privileges on the input table:

      mysql> GRANT SELECT, ALTER ON input_schema.input_table TO 'user_name'@'%';
    • SELECT, INSERT, CREATE, DROP, ALTER, UPDATE privileges on the schema where the output table is created.

      mysql> GRANT SELECT, INSERT, CREATE, DROP, ALTER, UPDATE ON output_schema.* TO 'user_name'@'%';

For more information, see Privileges Provided by MySQL and Default MySQL Privileges.