Ad Widget

Collapse

MySQL DB Maintenance to Reduce Whitespace?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MySQL DB Maintenance to Reduce Whitespace?

    Good day. I'm running the Zabbix 4.4.6 VHD appliance on Hyper-V on my home hobby network. Originally, the housekeeping settings were set at default. I decided I didn't really need/want more than 90 days of data available, so I setup the housekeeping tasks for that. That seems to be working fine as the data available is gradually being reduced. As the data is reduced, is the whitespace in the DB ever consolidated? I would be more than happy to do it manually, but I cannot even find a way to login to MySQL. If I was able to login, I'd also be more than happy to teach myself via online tutorials. Any thoughts? Thanks for reading and any replies.

    Peder

    #2
    Zabbix won't do this for you, since it's more a behavior of the underlying database and whether or not you're using database partitioning for history (the appliance wouldn't be by default).

    If you've adjusted your history settings in Zabbix and it's now keeping less data, you can perform a maintenance task to OPTIMIZE the tables that can be shrunk, so they take less space on disk.

    I don't know what the default database 'root' password is for the appliance, but I would first check the Linux root user's /root/.my.cnf file, to see if it's present there. If not, if you can log in to the appliance as the Linux root user, you could shut down zabbix-server and httpd/php and then use e.g. mysqladmin to reset the MySQL root password. Once you have it set to something you know, you can log in to MySQL as the database root user and issue the appropriate OPTIMIZE commands.

    Comment


      #3
      Thanks for your reply, Tim, and the tips. The appliance doesn't allow login as root, only as the "appliance" user. Anything I want to do I have to do from the CL and sudo to do that. Can't even browse a lot of the file structure because of permissions (I like to use WinSCP for easy search and editing). I'm probably better off just letting it go. It's just a hobby installation at home anyway, watching a few machines for fun. Probably end up nuking something, and a little blank space in the DB probably won't kill me. Thanks again.

      Peder

      Comment

      Working...
      X