Skip to content

Where to change sql_mode on Aurora MySQL 8.0?

0

During Aurora MySQL upgrade from 5.7 to 8.0, I noticed the warning below.

I'd like to know if I have to change this in RDS parameter groups or by a SQL command on the DB instance?

I checked the default RDS parameter group for 8.0, and it is set to sql_mode 0 currently.

If on the parameter group, what would I have to add?

"id": "zeroDatesCheck",
"title": "Zero Date, Datetime, and Timestamp values",
"status": "OK",
"description": "Warning: By default zero date/datetime/timestamp values are no longer allowed in MySQL, as of 5.7.8 NO_ZERO_IN_DATE and NO_ZERO_DATE are included in SQL_MODE by default. These modes should be used with strict mode as they will be merged with strict mode in a future release. If you do not include these modes in your SQL_MODE setting, you are able to insert date/datetime/timestamp values that contain zeros. It is strongly advised to replace zero values with valid ones, as they may not work correctly in the future.",
"documentationLink": "https://lefred.be/content/mysql-8-0-and-wrong-dates/",
"detectedProblems": [
{
"level": "Warning",
"dbObject": "global.sql_mode",
"description": "does not contain either NO_ZERO_DATE or NO_ZERO_IN_DATE which allows insertion of zero dates"
}
]
1 Answer
1
Accepted Answer

Tried and seems that it worked.

  1. Created new parameter cluster
  2. Modified sql_mode, adding NO_ZERO_IN_DATE,NO_ZERO_DATE
  3. Attached to instance
  4. Rebooted
answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.