Zoyinc
  • Home
  • Contact
  • Categories
    • CD Archiving
    • GIMP
    • Linux
    • MythTV
    • Open Media Vault
    • Technology
    • VMware
    • WordPress
    • YouTube
  • About


Monitor all queries to MariaDB

By

Tony

,

November 10, 2019

Want to see what is being run against your MariaDB this is what to do.

Firstly you need to enable logging to a file of all queries. You do this by running:

SET GLOBAL general_log=1;
SET GLOBAL general_log_file=’/var/opt/rh/rh-mariadb102/log/mariadb/maria_general.log’;

Problem is you need special permissions and in practical terms the easiest way is to run it as the root MariaDB user on the host machine. So login to the host machine and run this

mysql -u root -p
SET GLOBAL general_log=1;
SET GLOBAL general_log_file=’/var/opt/rh/rh-mariadb102/log/mariadb/maria_general.log’;
COMMIT;

I am not sure if the COMMIT; is required, I have only added it because I added it to be sure.

You can also enable this functionality by adding parameters to the startup command of MariaDB

Related

CentOS 7 VM for WordPress and MythTV – Post install setup
Backup and restore WordPress
Enable ssh in and out of ESX
Reinstate deleted user OKD 4.5
Recent

  • AlmaLinux GUI – no taskbar or application shortcuts

    AlmaLinux GUI – no taskbar or application shortcuts

  • AlmaLinux 9.5 base VM

    AlmaLinux 9.5 base VM

  • Reset Kodi thumbnails

    Reset Kodi thumbnails

  • Set default settings values in Kodi skins

    Set default settings values in Kodi skins

  • Add/Remove/Reset music/video libraries in Kodi

    Add/Remove/Reset music/video libraries in Kodi

  • Zoyinc Kodi skin on Sony TV

    Zoyinc Kodi skin on Sony TV

  • [L] – WordPress UAM Locked Post

    [L] – WordPress UAM Locked Post

  • Import Pictures and Videos – images not previewed

    Import Pictures and Videos – images not previewed

  • Find My Train

    Find My Train

  • WordPress style name not visible

    WordPress style name not visible

About Zoyinc

  • Contact Us
  • Zoyinc Disclaimer
  • Google Search Console
  • Privacy Policy
  • Site Statistics
  • Login

Apache Auckland Backup CD CentOS Centos7 Children Configuration Debian Error ESX ESXi Fedora Firewall Install Josh Kids Kodi Linux MariaDB MySQL MythTV New Zealand OKD OMV Open Media Vault OpenShift PHP Player Python RAID RedHat Red Hat Rip School Setup SMB SonicWALL Spark tags Train Trains VLAN VM VMware Weaver Windows WordPress YouTube

Powered by

This site is licensed under a Creative Commons Attribution 4.0 International License.