• Resolved bababoom

    (@bababoom)


    Hi there,

    After migration I have an error log with that line repeating all the time:

    WordPress database error Unknown column 'ip_long_begin' in 'where clause' for query SELECT tag FROM cerber_acl WHERE ip_long_begin <= 1844093507 AND 1844093507 <= ip_long_end AND tag = "W" LIMIT 1 made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, {closure}, cerber_access_control, cerber_acl_check

    I already repair database according to your help section but it continues to grow anyway.

    Can you help please? ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author gioni

    (@gioni)

    Hi!

    Please follow this guide: https://wpcerber.com/repair-database-tables/

    Thread Starter bababoom

    (@bababoom)

    Hi Gioni, I already followed your guide but the error log is created after that anyway with the same error.

    Plugin Author gioni

    (@gioni)

    That’s weird. Please check the information about the DB table cerber_acl. Go to the Tools / Diagnostic admin page and find cerber_acl in the Database info section. Copy paste it here.

    Thread Starter bababoom

    (@bababoom)

    Sure, here is it:

    Field	Type	Collation
    ip	varchar(39)	ascii_general_ci
    tag	char(1)	utf8_general_ci
    comments	varchar(250)	utf8_general_ci
    
    Name	cerber_acl
    Engine	InnoDB
    Version	10
    Row_format	Compact
    Rows	0
    Avg_row_length	0
    Data_length	16384
    Max_data_length	0
    Index_length	0
    Data_free	0
    Auto_increment	
    Create_time	2018-03-12 20:00:21
    Update_time	
    Check_time	
    Collation	utf8_general_ci
    Checksum	
    Create_options	
    Comment	Cerber IP Access Lists
    Thread Starter bababoom

    (@bababoom)

    Was it what you asked or do you need something else?

    Sincerely,
    Simon

    Plugin Author gioni

    (@gioni)

    Repeat those steps: https://wpcerber.com/repair-database-tables/
    On the six step check the “Some minor DB errors were detected” message in Database info section. There will be shown some errors. Copy paste them here.

    Thread Starter bababoom

    (@bababoom)

    Here are the minor DB errors detected after repairing the tables:

    Array
    (
        [0] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_log'
                [1] => ALTER TABLE cerber_log CHANGE stamp stamp DECIMAL(14,4) NOT NULL
            )
    
        [1] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_log'
                [1] => ALTER TABLE cerber_log ADD ip_long BIGINT UNSIGNED NOT NULL DEFAULT "0" COMMENT "IPv4 long" AFTER ip, ADD INDEX (ip_long)
            )
    
        [2] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_acl'
                [1] => ALTER TABLE cerber_acl ADD ip_long_begin BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT 'IPv4 range begin' AFTER ip, ADD ip_long_end BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT 'IPv4 range end' AFTER ip_long_begin
            )
    
        [3] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_acl'
                [1] => ALTER TABLE cerber_acl ADD UNIQUE ip_begin_end (ip, ip_long_begin, ip_long_end)
            )
    
        [4] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_acl'
                [1] => ALTER TABLE cerber_acl DROP INDEX ip
            )
    
        [5] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_acl'
                [1] => ALTER TABLE cerber_acl DROP INDEX begin_end
            )
    
        [6] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_acl'
                [1] => ALTER TABLE cerber_acl ADD INDEX begin_end_tag (ip_long_begin, ip_long_end, tag)
            )
    
        [7] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_log'
                [1] => ALTER TABLE cerber_log 
            ADD session_id CHAR(32) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT "",
            ADD country CHAR(3) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT "" COMMENT "Country code",
            ADD details VARCHAR(250) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT "" COMMENT "Details about HTTP request";
          
            )
    
        [8] => Array
            (
                [0] => ALTER command denied to user 'f4tst3pr3c0r_aD7Z6z512cZqkf'@'localhost' for table 'cerber_log'
                [1] => ALTER TABLE cerber_log ADD INDEX session_index (session_id)
            )
    
    )
    Plugin Author gioni

    (@gioni)

    Your hosting provider (database administrator) has denied several important SQL commands for the website DB connection. In your case the ALTER database command must be granted for the user f4tst3pr3c0r_aD7Z6z512cZqkf.

    Thread Starter bababoom

    (@bababoom)

    Indeed! Thanks!

    After being attacked I’ve allowed only primary SQL command by security and I didn’t search to interpret those errors.. Sorry for that.

    Since then, I repaired the tables and now I only have those minor errors (a lot less):

    Array
    (
        [0] => Array
            (
                [0] => Can't DROP 'begin_end'; check that column/key exists
                [1] => ALTER TABLE cerber_acl DROP INDEX begin_end
            )
    
    )
    Plugin Author gioni

    (@gioni)

    It’s OK. Ignore this error.

    Thread Starter bababoom

    (@bababoom)

    Thanks a lot for your help Gioni ??
    Have a great one!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Database error even after Repair db’ is closed to new replies.