In mysql, ERROR 1406 (22001):data too long for column
: DEFAULT CHARSET=utf8 is added at the end of the created table
drop table if exists sys_user;
create table sys_user (
user_id bigint(20) not null auto_increment comment 'User ID',
dept_id bigint(20) default null comment 'Department ID',
login_name varchar(30) not null comment 'login account',
user_name varchar(30) not null comment 'user nickname',
user_type varchar(2) default '00' comment 'user type (00 system user)',
email varchar(50) default '' comment 'user email',
phonenumber varchar(11) default '' comment 'phone number',
sex char(1) default '0' comment 'User gender (0 male 1 female 2 unknown)',
avatar varchar(100) default '' comment 'avatar path',
password varchar(50) default '' comment 'password',
salt varchar(20) default '' comment 'salt encryption',
status char(1) default '0' comment 'Account status (0 normal 1 disabled)',
del_flag char(1) default '0' comment 'Delete flag (0 means present 2 means deleted)',
login_ip varchar(50) default '' comment 'last login ip', login_date datetime comment 'last login',
create_by varchar(64) default '' comment 'creator', create_time datetime comment 'create time',
update_by varchar(64) default '' comment 'updater', update_time datetime comment 'update time',
comment varchar(500) default null comment 'Remarks', primary key (user_id)
) engine=innodb auto_increment=100 comment = 'user information table' DEFAULT CHARSET=utf8;
insert into sys_user values(1, 103, 'admin', 'admin', '00', '[email protected]', '15888888888', '1', '', '123456', '111111', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', 'ADMIN');
insert into sys_user values(2, 105, 'ry', 'admin', '00', '[email protected]', '15666666666', '1', '', '123456', '222222', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', 'TEST');
Read More:
- ERROR 1054(42S22) Unknown column ‘password’ in ‘field list’ (Fixed)
- MYSQL Index Key Length 1071 – Specified key was too long; max key length is 3072 bytes
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- ERROR 1265 (01000): Data truncated for column ‘ENABLED’ at row 7
- MySQL 8.0 error 1114 (HY000): the table’sbtest1’is full (Fixed)
- Solve ERROR 1136 (21S01) in Mysql: Column count doesn’t match value count at row 1
- Error running ‘Application‘: Command line is too long [How to Solve]
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- [Solved] EOS7.6 Error: Init DB failed [Specified key was too long; max key length is 767 bytes…
- [Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘
- Mysql5.7.18.1 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- Mysql Script Error Code: 1136. Column count doesn’t match value count at row 1
- C# Connect MYSQL Error: MySql.Data.MySqlClient.MySqlException:“SSL Connection error.”
- MySQL Error: [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
- Error creating foreign key in MySQL: 1215 cannot add the foreign key constraint
- [Solved] FATAL ERROR: please install the following Perl modules before executing /application/mysql/scripts/mysql_install_db: Data::Dumper
- [Solved] Mysql Error: [Err] 1136 – Column count doesn‘t match value count at row 1
- postgresql-Database query problem-ERROR: column “t.domainid“ must appear in the GROUP BY clause or be used in an a
- ERROR 1075 (42000) Incorrect table definition; there can be only one auto column and it must be defi