スキーマ、データ、メタデータを移行元データベースから移行先データベースに移行する場合は、これらの情報がすべて正確に移行されるようにする必要があります。Database Migration Service は、データベース オブジェクト(スキーマ、データ、メタデータなど)をデータベース間で忠実に移行する方法を提供します。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-05 UTC。"],[[["\u003cp\u003eDatabase Migration Service ensures accurate migration of database objects, including schema, data, and metadata, from one database to another.\u003c/p\u003e\n"],["\u003cp\u003eAll tables, excluding MySQL system databases such as \u003ccode\u003esys\u003c/code\u003e, \u003ccode\u003emysql\u003c/code\u003e, \u003ccode\u003eperformance_schema\u003c/code\u003e, and \u003ccode\u003einformation_schema\u003c/code\u003e, are migrated.\u003c/p\u003e\n"],["\u003cp\u003eSchema elements like naming, primary keys, data types, and metadata components such as stored procedures, functions, and triggers are all migrated.\u003c/p\u003e\n"],["\u003cp\u003eUser account login information and non-default flag settings are not migrated; they must be managed directly in the Cloud SQL destination instance.\u003c/p\u003e\n"],["\u003cp\u003eData manipulation language (DML) and data definition language (DDL) changes to data, schema, and metadata are continuously updated during ongoing migrations.\u003c/p\u003e\n"]]],[],null,["# Migration fidelity\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/database-migration/docs/postgres/migration-fidelity \"View this page for the PostgreSQL version of Database Migration Service.\") \\| [PostgreSQL to AlloyDB](/database-migration/docs/postgresql-to-alloydb/migration-fidelity \"View this page for the PostgreSQL to AlloyDB version of Database Migration Service.\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOverview\n--------\n\nWhen you're migrating your schema, data, and metadata from a source database to a\ndestination database, you want to ensure that all of this information is\nmigrated accurately. Database Migration Service provides a high-fidelity way to\nmigrate database objects (including the schema, data, and metadata) from one\ndatabase to another.\n\nAll of the following data, schema, and metadata components are migrated as part\nof the database migration:\n\n### Data\n\n- All tables from all databases and schemas, excluding the following system databases: `sys`, `mysql`, `performance_schema`, and `information_schema`.\n\n### Schema\n\n- Naming\n\n- Primary key\n\n- Data type\n\n- Ordinal position\n\n- Default value\n\n- Nullability\n\n- Auto-increment attributes\n\n- Secondary indexes\n\n### Metadata\n\n- Stored procedures\n\n- Functions\n\n- Triggers\n\n- Views\n\n- Foreign key constraints\n\n### Continuous migration\n\nData manipulation language (DML) and data definition language (DDL)\nchanges to all data, schemas, and metadata listed above are\nupdated during continuous migrations.\n\n### What isn't migrated\n\nWhen migrating a MySQL database, MySQL system databases aren't migrated. These databases contain information about users and privileges. Because of this, user account login information must be managed in the destination Cloud SQL database instance directly.\n\nTo add users to the Cloud SQL destination instance, navigate to the instance and add users from the **Users** tab, or add them from the MySQL client.\n\n[Learn more about creating and managing MySQL users](/sql/docs/mysql/create-manage-users).\n\nIn addition to users and privileges, non-default flag settings aren't migrated to the Cloud SQL destination instance. Run\n[\u003cvar translate=\"no\"\u003eSHOW VARIABLES\u003c/var\u003e](https://dev.mysql.com/doc/refman/8.0/en/show-variables.html)\non your source database before migrating your schema, data, and metadata to the\ndestination database, and then run it again on the Cloud SQL\ndatabase. Update flag settings as needed on the Cloud SQL database to\nreplicate the source settings.\n| **Note:** Some flags that apply to a primary database may not make sense on a replica. Also, not all MySQL flags are allowed on a Cloud SQL instance. Refer to the [Cloud SQL documentation](/sql/docs/mysql/flags) for more information."]]