Review the following requirements to export query results.
-
Ask the admin user to grant you the
EXPORT_QUERY_RESULTS
privilege. Replaceuser_name
anddatabase_name
in the following command with the appropriate user name and database name.mysql>GRANT EXPORT_QUERY_RESULTS ON database_name.* TO 'user_name'@'%';
The resource principal policy for Exporting Query Results to Object Storage. See Resource Principal Privileges.
The required pre-authenticated request privileges. See PAR Privileges.
The required uniform resource identifier (URI) privileges. See URI Privileges.
When you create pre-authenticated requests (PAR) to export query results, do the following:
For Pre-Authenticated Request Target, select or .
For Access Type, select Permit object reads and writes.
Select Enable Object Listing.
See Object Storage Pre-Authenticated Requests from Oracle Cloud Infrastructure Documentation to learn more.
For MySQL HeatWave on AWS, you need the Lakehouse role to access Object Storage. This role is required even when Lakehouse is disabled. For more information, see Configure Policies and Roles to Access Resources.
Depending on the type of file you want to create, review the appropriate section: