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 following privileges are required:

    • The FILE privilege:

      mysql> GRANT FILE ON *.* TO 'user_name'@'%';
    • The PROCESS privilege:

      mysql> GRANT PROCESS ON *.* TO 'user_name'@'%';
    • The SELECT privilege on the performance_schema schema:

      mysql> GRANT SELECT ON 'performance_schema'.* TO 'user_name'@'%';
    • The EXECUTE privilege on the sys schema:

      mysql> GRANT EXECUTE ON 'sys'.* 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.