Error in Drupal 7 – Notice: unserialize() [function.unserialize]: Error at offset X of Y bytes in variable_initialize()…

Search error in database.
a) replace Y with the number from your error message,
b) identify the name of variable causing the issue,
c) replace NAME in the SQL query.

SELECT name, LENGTH( value ) , value
FROM variable
WHERE LENGTH( value ) = Y

DELETE FROM variable WHERE name = 'NAME'