According to MySQL manual, table comments are limited to 60 characters. I'm designing the schema in MySQL Workbench, which does not enforce this limit, so I end up with writing more than 60 symbols quite often, and this causes the SQL script to fail. To tell the truth I would be quite happy with table comments being internal to my schema (i.e. not exported to the actual database), but Workbench doesn't allow this either. Hence my question: is there a way to increase maximum length of table comment in MySQL to 255?
This is a type of comment. The /* is the beginning of a comment and */ is the end of comment. MySQL will ignore the above comment.
The maximum length of a table name is 64 characters long according to MySQl version 8.0.
The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.
According to this bug report, Workbench was fixed in 5.0.18 to not allow comments over 60 characters.
I'm pretty sure there's no way to increase the limit, but if you turn off strict mode (even temporarily while you import) then it should truncate it with a warning instead of throwing an error.
I came here from google - There is no way (besides the patch), but the comment lengths have been significantly increased, as I summed up here https://stackoverflow.com/a/14502814/857958
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With