As of mysql version 5.7.8, the variable max_statement_time
was renamed to max_execution_time
. I have an application that checks the database version and sets the correct variable according to that version number.
When I configure my application to use a local mysql installation, everything is fine, but when I configure it to use Google Cloud Sql, it works on 5.7, but fails on 5.6. The error it gives is:
java.sql.SQLException: Unknown system variable 'max_statement_time'
From a mysql shell I ran show variables like 'max%time'
and got these results:
max_execution_time
max_execution_time
max_statement_time
I see that google has documentation about these flags here but max_statement_time
doesn't appear in the list. Is there something I can do to force that flag to appear so that my application can set it an proceed happily?
Cloud SQL is a Google managed service. You do not have access to change all the mysql flags freely. Here there is the list of flags that you can see/ modify. If max_statement_time
is not in that list it you cannot do anything related to it.
My recommendation is to use max_execution_time
flag instead of max_statement_time
. As it is mentioned in the documentation:
For a given flag, Cloud SQL might support a different range than the corresponding MySQL parameter or option.
The flags/ limations are not the same for CloudSQL with a simple MySQL database.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.