Question

Are MySQL comments allowed on Databases hosted by Digital Ocean?

I receive this exception anytime when trying to add a comment on a database column or table:

add column label_data mediumtext NULL DEFAULT NULL COMMENT 'Shipping labels file encoded in base64' to table {{%orders}} ...Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMMENT 'Shipping labels file encoded in base64'' at line 1

It this because of a user permission issue on the hosted MySQL?

Subscribe
Share

Submit an 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.

Hi @cgsmith,

MySQL comments are allowed on MySQL managed database, The error is due to a syntax error and it is not a permission issue; you can run below alter SQL statement to add column label_data with COMMENT.

alter table test add column label_data mediumtext NULL DEFAULT NULL COMMENT 'Shipping labels file encoded in base64';

I hope this helps!

Regards, Rajkishore