Migrar desde MySQL de Amazon RDS sin privilegios de SUPERUSER
Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Para crear y ejecutar correctamente una tarea de migración con una o varias fuentes de MySQL de Amazon RDS que no permitan privilegios de SUPERUSER, es posible que tengas que seguir algunos pasos adicionales.
Crear la tarea de migración de Amazon RDS MySQL
MySQL limita la definición del nombre de host de origen a 60 caracteres. Los nombres de host de las bases de datos de Amazon RDS suelen tener más de 60 caracteres. Si este es el caso de la base de datos que vas a migrar, configura una redirección de DNS para crear un registro CNAME que asocie tu nombre de dominio con el nombre de dominio de tu instancia de base de datos de Amazon RDS. Para obtener más información sobre cómo configurar un CNAME de DNS, consulta la documentación de Cloud DNS o la documentación de AWS Route53.
Los registros binarios deben almacenarse en un almacenamiento en bloque estándar y no se pueden almacenar en Amazon S3.
Para crear una tarea de migración continua con un volcado manual, debe habilitar GTID. GTID_MODE debe ser ON, OFF o OFF_PERMISSIVE. No se admite el valor GTID_MODE de
ON_PERMISSIVE.
Ejecutar la tarea de migración
Para hacer el volcado completo inicial, tanto en MySQL Amazon RDS como en las fuentes sin privilegio SUPERUSER, las escrituras deben detenerse en la fuente durante unos 20 segundos.
Puedes detener las escrituras migrando desde una réplica de lectura o deteniendo las escrituras directamente en la base de datos de origen.
Para migrar desde una réplica de lectura, sigue estos pasos:
Crea una réplica de lectura en Amazon Web Services (AWS).
Configura el perfil de conexión de origen del servicio de migración de bases de datos con la información de conectividad de la réplica de lectura de AWS.
Cuando el estado del trabajo de migración cambie a Starting | Waiting for source writes to stop (Iniciando | Esperando a que se detengan las escrituras de origen), inhabilita la replicación entre la instancia principal de AWS y su réplica de lectura durante unos 20 segundos.
Cuando el estado del trabajo de migración cambie a En ejecución | Volcado completo en curso, vuelve a habilitar la replicación en la réplica de lectura de AWS.
En lugar de detener las escrituras migrando desde una réplica de lectura en AWS, puedes detenerlas directamente en la base de datos de origen. Puedes usar
una secuencia de comandos para verificar que se han detenido todas las operaciones de escritura en la base de datos de origen.
La indicación de cuándo detener y reanudar las escrituras se encuentra en el estado y el subestado de la tarea de migración. Los cambios de estado se pueden monitorizar en la API, en la consola o directamente en Cloud Monitoring:
Cuando el estado cambie a Iniciando | Esperando a que se detengan las escrituras de origen,
se deben detener las escrituras en la base de datos de origen. Database Migration Service identifica que la escritura se ha detenido y el estado cambia a En ejecución | Preparando el volcado.
Cuando el estado cambie a En ejecución | Volcado completo en curso, podrás reanudar la escritura en la base de datos de origen.
Database Migration Service sigue intentando hacer el volcado inicial durante aproximadamente 20 minutos. Si no se han detenido las escrituras o se reanudan antes de la actualización del estado, el proceso falla y devuelve un error que describe la causa del fallo.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003eFor Amazon RDS MySQL sources with hostnames exceeding 60 characters, configure a DNS redirect using a CNAME record to associate your domain name with the RDS instance's domain name.\u003c/p\u003e\n"],["\u003cp\u003eBinary logs for the migration process must be stored on standard block storage, not Amazon S3.\u003c/p\u003e\n"],["\u003cp\u003eContinuous migration jobs using manual dumps necessitate that \u003ccode\u003eGTID\u003c/code\u003e is enabled, with the \u003ccode\u003eGTID_MODE\u003c/code\u003e set to either \u003ccode\u003eON\u003c/code\u003e, \u003ccode\u003eOFF\u003c/code\u003e, or \u003ccode\u003eOFF_PERMISSIVE\u003c/code\u003e, as \u003ccode\u003eON_PERMISSIVE\u003c/code\u003e is not supported.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure a successful initial full dump, writes to the source database should be halted for approximately 20 seconds, either by using a read replica or directly on the source.\u003c/p\u003e\n"],["\u003cp\u003eThe migration job status, trackable via the API, Console, or Cloud Monitoring, indicates when to stop writes (\u003cstrong\u003eStarting | Waiting for source writes to stop\u003c/strong\u003e) and resume writes (\u003cstrong\u003eRunning | Full dump in progress\u003c/strong\u003e).\u003c/p\u003e\n"]]],[],null,["# Migrating from Amazon RDS MySQL without SUPERUSER privileges\n\n\u003cbr /\u003e\n\nSuccessfully creating and running a migration job with an Amazon RDS MySQL source or\nsources that don't allow SUPERUSER privileges can require a few additional steps.\n\nCreate the Amazon RDS MySQL migration job\n-----------------------------------------\n\n1. MySQL limits the source hostname definition to 60 characters. Amazon RDS\n databases hostnames will typically be longer than 60 characters. If this\n is the case for the database you are migrating, configure\n a DNS redirect to create a\n [CNAME record](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html)\n that associates your domain name with the domain name of your Amazon RDS DB\n instance. You can read more about setting up DNS CNAME in the\n [Cloud DNS documentation](/dns/docs/set-up-dns-records-domain-name) or in the\n [AWS Route53 documentation](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-rds-db.html).\n\n2. Binary logs must be stored on standard block storage and cannot be stored\n on Amazon S3.\n\n3. Creating a continuous migration job with a manual dump provided requires\n `GTID` to be enabled. `GTID_MODE` must be either\n \u003cvar translate=\"no\"\u003eON\u003c/var\u003e, \u003cvar translate=\"no\"\u003eOFF\u003c/var\u003e, or \u003cvar translate=\"no\"\u003eOFF_PERMISSIVE\u003c/var\u003e. The `GTID_MODE` value of\n \u003cvar translate=\"no\"\u003eON_PERMISSIVE\u003c/var\u003e isn't supported.\n\nRun the migration job\n---------------------\n\nTo take the initial full dump, both for MySQL Amazon RDS and for sources with no `SUPERUSER` privilege, writes should be stopped at the source for approximately 20 seconds.\n\nYou can stop writes either by migrating from a read replica or by stopping writes directly on the source database.\n\nTo migrate from a read replica:\n\n1. Create a read replica in Amazon Web Services (AWS).\n\n2. Configure the Database Migration Service source connection profile with the connectivity information of the AWS read replica.\n\n3. After the status of the migration job changes to **Starting \\| Waiting for source writes to stop**, disable replication between the AWS primary and its read replica for approximately 20 seconds.\n\n4. After the status of the migration job changes to **Running \\| Full dump in progress**, re-enable replication to the read replica in AWS.\n\nInstead of stopping writes by migrating from a read replica in AWS, you can stop writes directly on the source database. You can use [a script](/database-migration/docs/mysql/debugging-tools#write-activities) to verify that all writing to the source database is stopped.\n\nIndication of when to stop and resume writes is in the status and substatus of\nthe migration job. The status changes can be tracked in the API, Console or\ndirectly in Cloud Monitoring:\n\n1. After the status changes to **Starting \\| Waiting for source writes to stop** ,\n writing should be stopped to the source database. Database Migration Service identifies that the writing stopped, and the status changes to **Running \\| Preparing the dump**.\n\n2. After the status changes to **Running \\| Full dump in progress**, it's safe\n to resume writing to the source database.\n\nDatabase Migration Service keeps trying to take the initial dump for approximately 20 minutes. If writes haven't been stopped, or if writes are resumed before the status update, then the process fails and returns an error describing the cause of the failure."]]