How to change the length of field settings? I have set once to a website a lenght limit to a field. And now the client wants to put more characters to that field. 

I cannot change the maximum size from Drupal because I get the following error message: 


  There is data for this field in the database. The field settings can no longer be changed.


However there must be a solution. Shall I change it in database (the field is one implemented by the Field-collections module)?
Dylan Tack solution is the easiest, but personally I enjoy exploring the inner wards of Drupal's database to seen how things are managed down there.
So, assuming you have a text field which machine name is field_text of 10 characters you want to grow to 25:

data will be stored in two tables: field_data_field_text and field_revision_field_text
definition is stored in field_config for the storage data, and field_config_instance for each instance of this field (stuff like label).

Now let's do a little heart surgery.

Alter the data tables columns definitions:
ALTER TABLE `field_data_field_text` 
CHANGE `field_text_value` `field_text_value` VARCHAR( 25 ) 
CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

ALTER TABLE `field_revision_field_text` 
CHANGE `field_text_value` `field_text_value` VARCHAR( 25 ) 
CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;


Change the definition column, this one is very tricky because it's stored in a BLOB, but that's not something that will stop you for doing this.

Dissect the guts of this BLOB thing:

SELECT CAST(`data` AS CHAR(10000) CHARACTER SET utf8) 
FROM `field_config` WHERE field_name = 'field_text';


This will give you something like:

a:7:{s:12:&quot;translatable&quot;;s:1:&quot;1&quot;;s:12:&quot;entity_types&quot;;a:0:{}s:8:&quot;settings&quot;;a:2:
    {s:10:&quot;max_length&quot;;s:2:&quot;10&quot;;s:17:&quot;field_permissions&quot;;a:5:
    //a lot more stuff...


This is a PHP serialized array, the interesting part is s:10:&quot;max_length&quot;;s:2:&quot;10&quot;;, this mean this array has a property named max_length (which name is a 10 characters string - hence the &quot;s&quot;) which value is 10 (which is a 2 characters long string). It's pretty easy, isn't it?

Changing its value is as easy as replacing the s:2:&quot;10&quot; part by s:2:&quot;25&quot;. Be careful: if your new value is longer in character length, you have to adapt the &quot;s&quot; part accordingly. For example putting 100 will be s:3:&quot;100&quot; as 100 length is 3 characters.

Let's put this new value back in the DB, don't forget to keep the whole string.


UPDATE `field_config` 
SET data = 'a:7:{...a:2:{s:10:&quot;max_length&quot;;s:2:&quot;25&quot;;...}'
WHERE `field_name` = 'field_text'


Flush your caches.


???

PROFIT!


By the way, PhpMyAdmin has some setting to allow direct modification of BLOB columns, but why go the easy way?
PS: This can also save your life when putting some PHP code in views and getting a WSOD because of an error in your code.