Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:20:46+00:00 2026-06-13T03:20:46+00:00

On a remote server I’m saving text (967 537 characters) from textarea to MySQL

  • 0

On a remote server I’m saving text (967 537 characters) from textarea to MySQL database, column with type of TEXT.

Only around 63 748 characters are saved.

Also, in phpMyAdmin I’m getting the following error when doing UPDATE:

Warning: #1265 Data truncated for column 'content' at row 1

Since I don’t have access to change config files myself, it would be good to know what should be changed to fix this problem before I request for it.

Versions:

PHP 5.2.14
MySQL 5.0.96
Apache 2.2.12

MySQL config:

max_allowed_packet = 52428800
net_buffer_length = 8192

PHP ini:

post_max_size = 32M

Apache:

suhosin.post.max_value_length = 1000000

On localhost, everything works just fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:20:48+00:00Added an answer on June 13, 2026 at 3:20 am

    Type TEXT is too small (it can only hold up to around 64K, as you discovered). You can use MEDIUMTEXT to reach 16M, or LONGTEXT to get even more. Given storage requirements (one extra byte for every row), if there’s the slightest risk of ever exceeding 16M, go with LONGTEXT.

    But I think you should question why you are storing data in the DB. Unless it is an indirect requirement of the platform (e.g. it’s easier to use an ORM, while file storage would need an ad hoc column data driver), or you want to make use of full text indexing functions, it might be more convenient to store data as separate files and only store the file name in the database (or you might use tablename_primarykeyvalue.html as file name, thus saving also file name storage requirements).

    The “separate storage” method complicates data retrieval and backups. On the other hand, backups will be smaller and faster, disk usage will be lower, and if your security model allows it, you could allow direct access to the files bypassing the database altogether: for example if you’re storing blog posts, you can retrieve them through AJAX, reducing database load and exploiting browser caching strategies (also, on some platforms, you can directly serve compressed files, thereby boosting speed and saving CPU).

    This post Do very large fields have a negative effect on MySQL databases? advocates MySQL TEXT storage, but also presents some considerations on why you might not want to.

    UPDATE

    On localhost, everything works just fine.

    Danger, Will Robinson! There’s no way it can work on localhost, unless your development and production databases are not synchronized. I.e., you have MEDIUMTEXT on localhost and TEXT on the remote. So the question is, what else could be different between the two databases? While not related to your question, it’s something you definitely want to check!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to copy several files to remote server. for database in `mysql -Bseshow
Is it possible to get data from remote server using JUST TSQL? I mean
Trying to take remote backup of sql server database using Perl. But somehow getting
I'm getting data from a remote server, that can produce JSONP but needs the
I am using a webservice from a remote server over SSL. The remote server
I wanted to copy files from a remote server, but it seems that the
Currently my application is getting data from remote server through web services. But some
I am trying to connect to a remote server and do some mysql queries
Given the remote server 'Production' (currently accessible via an IP) and the local database
Assume you work on a remote server from a local emacs shell (started with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.