Stay organized with collections Save and categorize content based on your preferences.
This page discusses some of the error messages encountered in Cloud SQL.
OverviewError messages in Cloud SQL come from many sources and appear in many places. Some error messages come from the database engines themselves, some from the Cloud SQL service, some from client applications, and some are returned by calls to the Cloud SQL Admin API.
This page includes some of the most common errors seen in Cloud SQL. If you do not find the error code or message you are looking for here, you can look for source reference material here:
If you don't find the reference material for the error message that you're seeing, you can also search in some of these places where other users may have relevant experience:
A | B | C | D | E | F | G | I | L | M | N | O | P | Q | R | S | T | U | W
Error message Troubleshooting Aborted connection xxx to db: DB_NAME. The application isn't ending connections properly.Check for the following conditions:
max_allowed_packet
variable value might be too small or queries require more memory than the allocated for mysqld. This can be resolved by raising the max_allowed_packet
flag to a much larger number.DEFINER
in a way that's not supported by Cloud SQL.
Update the definer in the external databases, for example from root@localhost
to root@%
or a non-superuser. See Stored Object Access Control for more information.
@XXX
.Try these things ...
You need to modify the private connection. Use the following command, and make sure to use the --force
argument:
gcloud services vpc-peerings update \ --network=VPC_NETWORK \ --ranges=ALLOCATED_RANGES \ --service=servicenetworking.googleapis.com \ --forceANY command denied to user 'root'@'%' for table ... The user doesn't have all the permissions it needs for this operation.
Try this:
USE mysql;
.GRANT PERMISSION_1,PERMISSION_2 ON *.* TO 'root' WITH GRANT OPTION;
USE 'Database_Name';
where Database_Name
is the database where you're creating the views.Illegal Argument
is one of the most common. In this case, the request is using either the wrong argument or an invalid value for the argument. For the many other causes, the error message might contain a useful hint.
For Illegal Argument
, check the request to make sure each argument is permissible and each value for the argument is valid. For all other causes, check the log files to see if there is more information there.
You need to modify the private connection. Use the following command, and make sure to use the --force
argument:
gcloud services vpc-peerings update \ --network=VPC_NETWORK \ --ranges=ALLOCATED_RANGES \ --service=servicenetworking.googleapis.com \ --forceConstraints/sql.restrictAuthorizedNetworks. The cloning operation is blocked by the
Authorized Networks
configuration. Authorized Networks
are configured for public IP addresses in the Connectivity section of the Google Cloud console, and cloning isn't permitted due to security considerations.
Remove all Authorized Networks
entries from the Cloud SQL instance if you can. Otherwise, create a replica without any Authorized Networks
entries.
Edit the primary instance to upgrade it to a larger disk size.
Error message Troubleshooting Failed to create subnetwork. No more available addresses in the IP range.Couldn't find free blocks in allocated IP ranges. Please allocate new ranges for this service provider.
There are no more available addresses in the allocated IP range.
Consider these possible scenarios:
For each of the above scenarios, you can elect to either expand the existing or allocate an additional IP range to the private service connection.
If you're allocating a new range, take care to not create an allocation that overlaps with any existing allocations.
After creating a new IP range, update the VPC peering with the following command:
gcloud services vpc-peerings update \ --service=servicenetworking.googleapis.com --ranges=OLD_RESERVED_RANGE_NAME,NEW_RESERVED_RANGE_NAME \ --network=VPC_NETWORK --project=PROJECT_ID \ --force
If you're expanding an existing allocation, take care to only increase the allocation range and not decrease it. For example, if the original allocation was 10.0.10.0/24, make the new allocation at least 10.0.10.0/23.
In general, if starting from a /24 allocation, decrementing the /mask by 1 for each condition (additional instance type group, additional region) is a good rule of thumb. For example, if trying to create both instance type groups on the same allocation, going from /24 to /23 is enough.
After expanding an existing IP range, update the vpc peering with following command:
gcloud services vpc-peerings update \ --service=servicenetworking.googleapis.com --ranges=RESERVED_RANGE_NAME \ --network=VPC_NETWORK \ --project=PROJECT_ID \ --forceError message Troubleshooting (gcloud.sql.connect) It seems your client does not have ipv6 connectivity and the database instance does not have an ipv4 address. You're trying to connect to your private IP instance using Cloud Shell.
Connecting from Cloud Shell to an instance with only a private IP address isn't currently supported.
Got packet bigger thanmax_allowed_packet
bytes when dumping table. The packet was larger than allowed by settings.
Use mysqldump
with the max_allowed_packet
option.
To learn more about using mysqldump
flags for managed import migration, see Allowed and default initial sync flags
Check that your OS and file system support files of this size. Check that the disk isn't full or out of disk quota. You can request an increase to your quotas from the Google Cloud console or edit the instance to upgrade it to a larger disk size.
Internal error. The project could be missing the Service Networking service account required for this feature.To repair service permissions, disable the Service Networking API
, wait five minutes and then re-enable it.
Service Networking API
isn't enabled in the project.
Enable the Service Networking API
in your project. If you see this error when you're trying to assign a private IP address to a Cloud SQL instance, and you're using a Shared VPC, you also need to enable the Service Networking API
for the host project.
Find the process that locked the table and stop it:
The first item in the list might be the one holding the lock, which the following items are waiting on.
SHOW INNODB STATUS
command can also be helpful.KILL <var>PID</var>
.Service Networking API
isn't enabled in the project.
Enable the Service Networking API
in your project. If you see this error when you're trying to assign a private IP address to a Cloud SQL instance, and you're using a Shared VPC, you also need to enable the Service Networking API
for the host project.
Wait for the previous operation to finish before beginning another.
Operation isn't valid for this instance. This error is returned from an API call toinstances.restoreBackup
, and it means that you cannot restore from backup to an instance with a storage size (XX GB) smaller than the backup size (YY GB).
Edit the target instance to increase its storage size.
Error message Troubleshooting Quota exceeded. You reached the limit of your per-minute or daily quota. Review the quotas and limits for Cloud SQL.Request an increase to your quotas from the Google Cloud console.
Error message Troubleshooting Remaining connection slots are reserved. The maximum allowed connections have been reached.Increase the value of the max_connections
flag. See Configuring database flags.
Verify that you have a valid service account key JSON file in the location stored in the GOOGLE_APPLICATION_CREDENTIALS
environment variable and that the variable points to the correct location.
innodb_large_prefix
set.
Set the innodb_large_prefix
flag to ON
when creating the replica or update the existing replica with the flag.
Create a new server certificate and rotate.
System error occurred.Try these things ...
WRITER
permissions on the bucket and READER
permissions on the export file. For more information on configuring access control in Cloud Storage, see Create and Manage Access Control ListsThe dump transaction can fail if you use the following statements during the export operation:
ALTER TABLE
CREATE TABLE
DROP TABLE
RENAME TABLE
TRUNCATE TABLE
Remove any of these statements from the dump operation.
Table db.table doesn't exist If one or more InnoDB table(s) disappeared after a MySQL restart and the MySQL error log has the following warnings at the same time, it is due to the foreign key and referenced key columns being out-of-sync.[Warning] InnoDB: Load table db.table failed, the table has missing foreign key indexes. Turn off 'foreign_key_checks' and try again. [Warning] InnoDB: Cannot open table db/table from the internal data dictionary of InnoDB though the .frm file for the table exists. See InnoDB troubleshooting for more information.
After a database restart, MySQL needs to load table(s) into the InnoDB dictionary cache on first access. If it detects the discrepancy, it blocks the access to that table.
mysql> select * from db.table; ERROR 1146 (42S02): Table db.table doesn't exist
Turning off foreign_key_checks
for the MySQL session allows access to the table again. Once the table is accessed and loaded into the dictionary cache, InnoDB doesn't check and complain about a foreign key mismatch until the next database restart
The foreign key mismatch should be fixed to avoid any further issues.
foreign_key_checks
for the mysql
client session and access the table.
mysql> SET SESSION FOREIGN_KEY_CHECKS=0;
mysql> SHOW CREATE TABLE parent_table; mysql> SHOW CREATE TABLE child_table;
Verify the corresponding columns have similar data types. The size and sign of fixed precision types such as INTEGER
and DECIMAL
are the same. For nonbinary (character) string columns, the character set and collation must be the same.
foreign_key_checks
again.
mysql> SET SESSION FOREIGN_KEY_CHECKS=1;
Use the CSV format and run multiple, smaller export jobs to reduce the size and length of each operation.
Too many connections. Setting themax_connections
flag value too high can cause this error. This can also be caused by enabling a flag out of sequence.
Lower the max_connections
flag value, or contact customer support to request a flag removal followed by a hard drain
. This forces the instance to restart on a different host with a fresh configuration, without the flag or setting.
serviceusage.services.use
or cloudsql.instances.connect
permissions.Try these things ...
Service Usage Consumer
role to the user account. This role includes the permission serviceusage.services.use
.COLUMN_STATISTICS
in information_schema. This happens if you use the mysqldump
binary from MySQL 8.0 to dump data from a MySQL 5.7 database and import to a MySQL 8.0 database.
If you dump data from a MySQL 5.7 database and import to a MySQL 8.0 database, make sure to use the mysqldump
binary from MySQL 5.7. If you use the mysqldump
binary from MySQL 8.0, you need to add the --column-statistics=0
flag.
The following table shows some known cases where an Unknown Error
can occur, and lists specific remedies where applicable. However, this is not a complete list. If you don't find your case in the table, check with the public issue tracker for Cloud SQL. If you don't find the issue there, consider submitting a report, or reviewing other support options.
Quota 'INTERNAL_FORWARDING_RULES_WITH_TARGET_INSTANCE_PER_NETWORK' exceeded. Limit: 100.0 globally
If the error is set Service Networking service account as servicenetworking.serviceAgent role on consumer project
, disable and re-enable the Service Networking API
. This action creates the service account necessary to continue with the process.
If the error is The instance creation failed due to a permission error with the CMEK key defined
, review the key settings and location.
Cloud SQL also uses some third-party binaries (for example, mysqld
), which can generate unknown error messages. Such errors are internal to the third-party binaries and are outside the scope of Cloud SQL. However, sometimes a more specific error can be found in the Cloud SQL log files at around the same time.
Also, sometimes it is an error code that is unknown. In this case, the complete message can be Unknown Error Code
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-14 UTC.
[[["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 2025-08-14 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4