Report this

What is the reason for this report?

Managed Database (MySQL) Characters query

Posted on March 3, 2021

Hey guys, we have currently an issue on a software which is connected against DO managed databases (MySQL). We campe up to the result, that the issue is in the command quotes.

As an example, is NOT working: SELECT * FROM someting_config where language_id = “2”

IS working SELECT * FROM someting_config where language_id = 2 (see the " in the id part.)

Before we are switching to managed database on DO we run this services on a own MySQL instance on a single server on DO. So looks like the managed database cluster can’t handle this.

Is there a way to change this setting? Can’t find anything regarding to it but maybe in the SQL Modes. Currently active:

  • ANSI_QUOTES
  • ERROR_FOR_DIVISION_BY_ZERO
  • IGNORE_SPACE
  • NO_ENGINE_SUBSTITUTION
  • NO_ZERO_DATE
  • NO_ZERO_IN_DATE
  • ONLY_FULL_GROUP_BY
  • PIPES_AS_CONCAT
  • REAL_AS_FLOAT
  • STRICT_ALL_TABLES

Thanks a lot! Best, Michael



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Solution: contact the DO Support, they can take care really fix to it and solve this perfectly.

Hi @goetzm,

We have updated regarding sql_mode functionality. You should now be able to set the global SQL mode for MySQL Cluster.

You can set the SQL mode by finding the cluster on the Databases page -> click the cluster’s name -> Settings tab - > Global SQL mode -> Edit button -> from the drop-down menu select the SQL mode you want to modify

Save to persist the change or cancel to revert.

The link provides more information on how to set global SQL mode on MySQL clusters

https://www.digitalocean.com/docs/databases/mysql/how-to/set-sql-mode/

Note: The ANSI (shorthand) label is a grouping of the below SQL mode setting. To explicitly update any of them, you will need to have ANSI enabled/select the ANSI(shorthand) label which removes it from the options, and then select any of the SQL Mode from the below

ANSI_QUOTES, IGNORE_SPACE, ONLY_FULL_GROUP_BY, PIPE_AS_CONCAT, REAL_AS_FLOAT

Regards, Rajkishore

Does no one have any ideas?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.