The accepted answer is incorrect (or, at least, rather self-confident) - I personally do not need data stored outside my database, as this creates difficulties in terms of backup procedures and transactional requests.
As others have pointed out, the manual repeatedly states that the BLOB and TEXT columns are not taken into account in relation to the total row size, but unfortunately with the default configuration settings this is not true and you get an error message, (The error message makes no sense because it tells you to use TEXT instead of VARCHAR to solve the problem - you are already.)
The reason for this limitation is the default storage engine, Antelope , which stores the first 768 bytes of variable-length columns per row - and a possible solution is to use INNODB and switch the storage engine to Barracuda's alternative storage engine:
SET GLOBAL innodb_file_format=Barracuda;
This will not have an immediate effect, because this option is standard for new database files, so you will need to drop and recreate the entire database.
Alternatively, switch to Barracuda (as described above) and then (optional) switch to the file strategy at the table:
SET GLOBAL innodb_file_per_table=ON;
Again, this will not have an immediate effect, because both settings are the default values ​​for new tables - so you will need to drop and recreate the table.
If you look into the MySQL data folder after that, you can confirm that separate files were created, for example. for a database named "data" and a table named "test" you should see a file called "data / test / bigtable.ibd".
If you don't like changing global settings in MySQL, try SET SESSION instead of SET GLOBAL , for example. just before running your CREATE TABLE statements.
mindplay.dk
source share