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!

ITnewbie
  • 171
  • 2
  • 9

1 Answers1

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.

Rick James
  • 2,463
  • 1
  • 6
  • 13