InMotion Hosting Support Center

SQL Constraint data too long for column 'name'

Category: Wordpress

2015-08-22 9:06 pm EST

Hits: 1,951
2015-08-22 20:48:39:SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1

That is my error above.. Here is a little run through of my problem..
I use a wordpress plugin called Digital Access Pass, it allows me to protect my content towards certain memberships..

I made a post Test, and I was able to protect that post..
I made a post Top 5 Strong Safeties in Madden NFL 16 Ultimate Team, and I was unable to protect that post because I get the SQL error: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1

I have a good feeling it has something to do with one of the dap_ tables in PHPMyAdmin.. but I don't know which one, and I don't know how to increase the amount of characters a certain section can take.. I've never had this problem up until this year, since I switched over from BlueHost to InMotion.

my website:

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User


43,761 Points
2015-08-24 9:45 am EST

Sorry to hear about your 1046 Constraint data too long for column 'name' error. This error is actually good and helps you to understand that you are trying to stuff too much data into a specific column.

For instance, if the 'name' column is only set to hold 50 characters and you are trying to give it a name with 75, then this is the result.

The error is due to the database being set in Strict mode. With strict mode turned off, MySQL will simply cut off any additional characters that you may need in the column. Using the same example as above, if you try to put a 75 character name in to a 50 character field, it will simply take the first 50 and drop the rest. This could be very bad if you are trying to store URLs or something else important. This could break many sites so the server is set to strict mode.

To fix your issue, you need to use phpMyAdmin and increase the size of the column in question (name). This way you can save the data you need to save in its entirety and not have it chopped thus losing precious data.

Kindest Regards,
Scott M

You must login before you can post a comment about this answer.

I can't find the option to increase the size of the column..
8 Points
2015-08-26 7:06 pm EST
Hello Xaflttexans,

In order to change the structure of the database, you would need:

1 - login to the cPanel
2 - open the phpMyAdmin (from the menu)
3 - Select your database
4 - Click on the specific table that needs to be altered
5 - Click on the tab labeled "STRUCTURE"
6 - Click on CHANGE for the item that you want to alter

I hope this helps to answer your question, please let us know if you require any further assistance.

Arnel C.
42,973 Points
2015-08-26 8:39 pm EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!