- Newest
- Most votes
- Most comments
Hello Miguel!
The error you're encountering is related to the use of @@MAX_STATEMENT_TIME which is not recognized or supported in your MySQL version or Aurora MySQL setup. This might be due to differences in the MySQL version compatibility or a specific feature set in Aurora MySQL.
Here's how you can resolve the issue:
-
Update
mysqldumpUtility: Ensure that you are using the latest version of themysqldumputility. An outdated version might not be fully compatible with your Aurora RDS instance. -
Disable MAX_STATEMENT_TIME: You can disable the
MAX_STATEMENT_TIMEby adding the--set-gtid-purged=OFFand--skip-max-statement-timeoptions to yourmysqldumpcommand. These options will skip the problematic setting.Here’s the updated command:
mysqldump --ssl-verify-server-cert=false -h xxxxx-mysql-main.cluster-yyy.eu-west-2.rds.amazonaws.com -u root -p --set-gtid-purged=OFF --skip-max-statement-time databasename > output.sql -
Check MySQL Version Compatibility: Verify the MySQL version of your Aurora RDS instance and ensure that it is compatible with the
mysqldumputility you are using. You can check the version by running:SELECT VERSION();Adjust your
mysqldumpoptions based on the specific version of MySQL or Aurora MySQL you are using. -
Additional Compatibility Options: If the issue persists, you might consider using additional compatibility options provided by
mysqldump. For instance, the--compatibleoption can be used to specify the target MySQL version or server:mysqldump --ssl-verify-server-cert=false -h xxxxx-mysql-main.cluster-yyy.eu-west-2.rds.amazonaws.com -u root -p --compatible=mysql40 databasename > output.sql
By making these adjustments, you should be able to avoid the SQL syntax error related to @@MAX_STATEMENT_TIME and successfully perform the mysqldump.
Feel free to ask if you have any further questions or need more assistance!
Never managed to solve it in my machine. So I created an EC2 with Amazon Linux 2023. Then I installed the client:
sudo dnf install mariadb105
mariadb-dump -h xxxxx-mysql-main.cluster-yyy.eu-west-2.rds.amazonaws.com -u root -p databasename > output.sql
It works.
Relevant content
- asked 2 years ago
- asked 8 months ago

Neither.