sql_require_primary_key Compatibility Issue
-
I am using a MySQL cluster for my database and, in order to ensure proper data replication, it is required that
sql_require_primary_keybe set totrue. Unfortunately, multiple Cerber tables do not have primary keys and, consequently, I cannot activate Cerber.I tried to add my own primary keys to the tables to test it out, but after doing so, none of my Cerber settings would save.
Here is the error output:
Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS cerber_log ( ip varchar(39) CHARACTER SET ascii NOT NULL, user_login varchar(60) NOT NULL, user_id bigint(20) unsigned NOT NULL DEFAULT '0', stamp bigint(20) unsigned NOT NULL, activity int(10) unsigned NOT NULL DEFAULT '0', KEY ip (ip) ) DEFAULT CHARSET=utf8; Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS cerber_acl ( ip varchar(39) CHARACTER SET ascii NOT NULL, tag char(1) NOT NULL, comments varchar(250) NOT NULL ) DEFAULT CHARSET=utf8; Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS cerber_blocks ( ip varchar(39) CHARACTER SET ascii NOT NULL, block_until bigint(20) unsigned NOT NULL, reason varchar(250) NOT NULL, reason_id int(11) unsigned NOT NULL DEFAULT '0', UNIQUE KEY ip (ip) ) DEFAULT CHARSET=utf8; Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS cerber_lab ( ip varchar(39) CHARACTER SET ascii NOT NULL, reason_id int(11) unsigned NOT NULL DEFAULT '0', stamp bigint(20) unsigned NOT NULL, details text NOT NULL ) DEFAULT CHARSET=utf8; Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS cerber_traffic ( ip varchar(39) CHARACTER SET ascii NOT NULL, ip_long BIGINT UNSIGNED NOT NULL DEFAULT '0', hostname varchar(250) NOT NULL DEFAULT '', uri text NOT NULL, request_fields MEDIUMTEXT NOT NULL, request_details MEDIUMTEXT NOT NULL, session_id char(32) CHARACTER SET ascii NOT NULL, user_id bigint(20) UNSIGNED NOT NULL DEFAULT 0, stamp decimal(14,4) NOT NULL, processing int(10) NOT NULL DEFAULT 0, country char(3) CHARACTER SET ascii NOT NULL DEFAULT '', request_method char(8) CHARACTER SET ascii NOT NULL, http_code int(10) UNSIGNED NOT NULL, wp_id bigint(20) UNSIGNED NOT NULL DEFAULT 0, wp_type int(10) UNSIGNED NOT NULL DEFAULT 0, is_bot int(10) UNSIGNED NOT NULL DEFAULT 0, blog_id int(10) UNSIGNED NOT NULL DEFAULT 0, KEY stamp (stamp) ) DEFAULT CHARSET=utf8; Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS cerber_qmem ( ip varchar(39) CHARACTER SET ascii NOT NULL, http_code int(10) UNSIGNED NOT NULL, stamp int(10) UNSIGNED NOT NULL, KEY ip_stamp (ip, stamp) ) DEFAULT CHARSET=utf8; Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. CREATE TABLE IF NOT EXISTS wp_cerber_uss ( user_id bigint(20) UNSIGNED NOT NULL, ip varchar(39) CHARACTER SET ascii NOT NULL, country char(3) CHARACTER SET ascii NOT NULL DEFAULT '', started int(10) UNSIGNED NOT NULL, expires int(10) UNSIGNED NOT NULL, session_id char(32) CHARACTER SET ascii NOT NULL DEFAULT '', wp_session_token varchar(250) CHARACTER SET ascii NOT NULL, KEY user_id (user_id) ) DEFAULT CHARSET=utf8;`
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘sql_require_primary_key Compatibility Issue’ is closed to new replies.