Stay organized with collections
Save and categorize content based on your preferences.
Migrate a self-managed MySQL metastore to Dataproc Metastore
This page shows you how to migrate your external self-managed MySQL metastore to
Dataproc Metastore by creating a MySQL dump file and importing
the metadata into an existing Dataproc Metastore service.
Before you begin
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get 300ドル in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator role
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator role
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
To enable APIs, you need the serviceusage.services.enable permission. If you
created the project, then you likely already have this permission through the
Owner role (roles/owner). Otherwise, you can get this permission through the
Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).
Learn how to grant roles.
To get the permissions that
you need to create a Dataproc Metastore and import a MySQL metastore,
ask your administrator to grant you the
following IAM roles:
To use the Cloud Storage object (SQL dump file) for import:
Storage Object Viewer (roles/storage.objectViewer)
on the Dataproc Metastore service agent. For example, service-CUSTOMER_PROJECT_NUMBER@gcp-sa-metastore.iam.gserviceaccount.com.
These predefined roles contain
the permissions required to create a Dataproc Metastore and import a MySQL metastore. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to create a Dataproc Metastore and import a MySQL metastore:
To create a service:
metastore.services.create
on the project.
To import metadata:
metastore.imports.create
on the project.
To use the Cloud Storage object (SQL dump file) for import:
storage.objects.get
on the Dataproc Metastore service agent. For example, service-CUSTOMER_PROJECT_NUMBER@gcp-sa-metastore.iam.gserviceaccount.com
You must now prepare the metadata stored in your Hive metastore database for
import by making a MySQL dump file and placing it into a Cloud Storage
bucket.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026年08月26日 UTC."],[],[]]