By eightysix
This is the error I get:
#1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
I searched the error and found some people talking about adding this to /etc/mysql/my.cnf
innodb_log_file_size = 512M
I did that and restarted Apache but I still get the error. I’ve also updated my php.ini file with:
memory_limit = 600M
I’m running a 1GB / 30GB Disk Ubuntu droplet. Is there something I am missing?
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!
I believe that the error is trying to say that when you add up the sizes of your 163 fields, they are larger than the 8126 that your current configuration is allowed.
You are actually attempting to create a row definition or place holder for the data which will have 163 different columns/fields whose total data width is larger than 8126.
Since you are maxing out at 8126, you might look at changing your innodb page size which is usually about double the row max. It’s currently at 16K. I have heard that it can be changed to 32 or even 64K. Or alternately, you can vertically split the table by putting the most important used data in table A and the least used important data in table A1 then linking them in reports and elsewhere via a primary->foreign key. If you just copy paste the create table statement here, it may be obvious to others here as to why the estimated width is larger than the allowed 8K.
On this page: https://dev.mysql.com/doc/refman/8.0/en/innodb-restrictions.html
I see this example which might visually prove to be helpful to you: mysql> CREATE TABLE t (a VARCHAR(8000), b VARCHAR(10000), -> c VARCHAR(10000), d VARCHAR(10000), e VARCHAR(10000), -> f VARCHAR(10000), g VARCHAR(10000)) ENGINE=InnoDB; ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
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.