Ad Widget

Collapse

Need to reclaim space from zabbix mysql database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ankushssgb
    Junior Member
    • Jun 2018
    • 11

    #1

    Need to reclaim space from zabbix mysql database

    Hi,

    I have zabbix mysql database and which consuming almost my 80 GB sapce, So can ypu please help me to reclaim that space.

    Since, currently I am not using zabbix on that server (as I created new zabbix server ).

    On current system there are many mysql Databases are present, out of which zabbix I am not using and which consuming almost 80 GB of space.

    In server below are the files are consuming more space:

    /var/lib/mysql/zabbix/history_uint.ibd
    /var/lib/mysql/zabbix/history.ibd
    /var/lib/mysql/zabbix/history_str.ibd

    Let me know the steps to do this and It should not impact other mysql databses running on that system.

    Regards,
    Ankush
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Originally posted by ankushssgb
    Hi,

    Since, currently I am not using zabbix on that server (as I created new zabbix server ).

    Regards,
    Ankush
    Hi Ankush,

    1. Check if NOTHING is using 'zabbix' database at least for 24 hours:
    Code:
     use zabbix;
    SELECT update_time FROM information_schema.tables WHERE table_schema='zabbix' AND table_name='history';
    SELECT table_schema,table_name,update_time FROM information_schema.tables WHERE update_time > (NOW() - INTERVAL 24 HOUR);
    2. Remove database 'zabbix':
    Code:
    drop database zabbix;
    drop user 'zabbix'@'localhost';
    flush privileges;
    commit;

    Comment

    Working...