Updated on 2025-06-07 GMT+08:00

U0400041: GaussDB does not support ALTER DATABASE READ ONLY

Description

Database Type and Version

  • Source database type and version: MySQL 5.5, 5.6, 5.7, and 8.0
  • Target database type and version: all GaussDB versions

Syntax Example

The ALTER DATABASE READ ONLY statement of MySQL can be used to modify the read attribute of a database. This error is reported because GaussDB does not support this syntax, for example:

ALTER DATABASE test_db READ ONLY = 0;

Suggestion

No solution is available. You are advised to refactor application code.