By cgsmith
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?
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.