I am using MySql 5.6 in production for my application. Now what happens is there is one field on the form in application which has data type char(2) table and its maximum length for input type is 25. Now when user types in characters more than 2 and hit save it prompts that
So I searched and found here that if I need to make this without error I need to switch MySQL mode to not use STRICT and hence I set sql_mode
in my.cnf file and tried. But still I am getting same error.
Here is my.cnf looks like:
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
I am using MySql 5.6 I am not getting what I am missing here. I want that error to disappear.
EDIT:
I did SET GLOBAL sql_mode = ''
and then did show variables;
Here is output:
But still getting same error.