0

I have a column with the data type "JSON" in the MySQL table(I have MySQL 8). I have a 20 MB JSON file created by my BE code and I would like to copy and paste the contents of the JSON file into the box. But my phpMyadmin keeps freezing when I copy and paste the contents. The contents didn't add to the column successfully.

enter image description here

According to the MySQL user guide, the maximum row size limit if 65,535 bytes:

The MySQL maximum row size limit of 65,535 bytes is demonstrated in the following InnoDB and MyISAM examples. The limit is enforced regardless of storage engine, even though the storage engine may be capable of supporting larger rows.

But I was able to copy and paste the contents into the column if I reduce the JSON size to 155,648 bytes.

Does MySQL allow us to copy large-size JSON content and paste it into MySQL column? If so, what is the proper way to copy and paste the contents of the 20 MB JSON file into the MySQL column?

I am very new to MySQL, any help is appreciated!

1
  • (MySQL admin questions should be asked in dba.stackexchange.com .)
    – Rick James
    Jul 21 at 1:54

1 Answer 1

0

The quote you presented about a 64KB limit for a row is bogus. MyISAM allows bigger rows; InnoDB puts big columns "off-record".

phpmyadmin is built on PHP and it runs under Apache (or other web server). Both have limitations on form sizes, etc. I think you need to do some programming so you can use a programming language, not a UI, for your task.

And then MySQL has a setting called max_allowed_packet which may be set to (or defaulted to) 16M or less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.