备注 | 修改日期 | 修改人 |
创建版本 | 2023-11-07 07:52:43[当前版本] | 系统管理员1 |
手动导入wcp数据库sql时,报以下错误:
Failed to add the foreign key constraint on table 'farm_doc_auditlog'. Incorrect options in FOREIGN KEY constraint 'wcp/FK_Reference_93'
其中一种可能的原因是,主表和外表的字段字符编码不同,是因为mysql的默认配置字符编码问题,请参考以下配置文件
[client] port = 3399 socket = MySQL default-character-set = utf8 user=root password=root [mysqld] max_connections=1000 port = 3399 socket = MySQL skip-external-locking key_buffer_size = 16M max_allowed_packet = 1M table_open_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M log-bin=mysql-bin binlog_format=mixed server-id = 1 character_set_server = utf8 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [myisamchk] key_buffer_size = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout