I add a InnoDB Memcached mapping in innodb_memcache.containers:
INSERT INTO `containers` (`name`, `db_schema`, `db_table`, `key_columns`, `value_columns`, `flags`, `cas_column`, `expire_time_column`, `unique_idx_name_on_key`) VALUES ('ycn_cloud_battery', 'ycn-cloud', 'battery', 'uuid', 'mah|mah_alive_capacity|mah_charge_capacity|cycle|curr_temperature|average_current|curr_voltage|bms_safety_status|bms_flags|transaction_status|order_id|status|user_id|update_time|create_time|available_status', '0', '0', '0', 'PRIMARY')
Then InnoDB_Memcached reports InnoDB_Memcached: failed to open table 'ycn-cloud/battery'
After double checked, the problem comes from the database name ycn-cloud
contains minus char.
How to make InnoDB_Memcached open the database?
Well, I had resolved my question.
InnoDB_Memcached plugin operators InnoDB data file directly. Database ycn-cloud
is named ycn@002dcloud
in MySQL file system. So change the ycn-cloud
to ycn@002dcloud
in innodb_memcache.containers.db_schema resolve the problem.