Netdata: A powerful tool to easily monitor the performance of MySQL databases on Linux systems
Netdata is a free and open source real-time system performance and health monitoring application suitable for Unix-like systems such as Linux, FreeBSD and macOS. It collects and visualizes various metrics, allowing you to monitor the system's operation in real time. Netdata supports a variety of plug-ins that can monitor the current system status, running applications and services, such as MySQL database servers, etc.
This article will guide you on how to use Netdata to monitor the performance of MySQL database servers on RHEL-based distributions. After reading, you will be able to visually monitor the bandwidth, query, handler, lock, problem, temporary files, connections, binlog and threading metrics of the MySQL database server through Netdata's web interface.
Step 1: Install MySQL database server in Linux system
If you haven't installed MySQL or MariaDB on your RHEL-based distribution, install one of them before setting up Netdata monitoring.
Install MySQL database server:
sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm sudo yum install mysql-community-server -y sudo systemctl start mysqld sudo systemctl enable mysqld sudo grep 'temporary password' /var/log/mysqld.log sudo mysql_secure_installation
Install the MariaDB database server:
sudo yum install mariadb-server -y sudo systemctl start mariadb sudo systemctl enable mariadb sudo mysql_secure_installation
In order to collect performance statistics from the MySQL/MariaDB database server, Netdata needs to connect to the database server. Therefore, create a database user named "netdata" that allows it to connect to the database server without a password on the local host.
mysql -u root -p CREATE USER 'netdata'@'localhost'; GRANT USAGE on *.* to 'netdata'@'localhost'; FLUSH PRIVILEGES; exit;
Step 2: Install Netdata to monitor MySQL performance
Netdata developers provide a single-line startup script that facilitates you to install Netdata from the source tree of the GitHub repository. The script downloads another script for detecting Linux distributions; installs the system packages required to build Netdata; then downloads the latest Netdata source code tree; and finally builds and installs Netdata on your system.
The following command will start the startup script and install the packages required for all Netdata plugins (including MySQL/MariaDB plugins):
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh
If you are not managing the system as root, you will be prompted for the user password of the sudo command, and you will also need to confirm some functions by pressing Enter.
After the script completes the build and installation of Netdata, you can start the Netdata service and make it automatically start when the system starts:
sudo systemctl start netdata sudo systemctl enable netdata
Netdata listens to port 19999 by default, which you will use to access the Web UI. Therefore, please open this port on the system firewall:
sudo firewall-cmd --permanent --add-port=19999/tcp sudo firewall-cmd --reload
Step 3: Configure Netdata to monitor MySQL/MariaDB
The default configuration is sufficient to start monitoring your MySQL/MariaDB database server. If you have read the documentation and have made any changes to the above files, you will need to restart the Netdata service for the changes to take effect:
sudo systemctl restart netdata
Next, open a web browser and access the Netdata Web UI using any of the following URLs:
<code>http://domain_name:19999或http://SERVER_IP:19999</code>
In the Netdata dashboard, search for "MySQL local" in the list of plugins on the right, and click it to start monitoring your MySQL/MariaDB server. You will be able to view bandwidth, queries, handlers, locks, and Galera (if applicable) visual data as shown in the following image:
Netdata GitHub repository : https://www.php.cn/link/a6424579bdf800415424996ec6d18dac
Summary: This article describes how to use Netdata to monitor the performance of MySQL/MariaDB database servers on RedHat-based systems. If you have any questions, please leave a message in the comment section.
The above is the detailed content of How to Monitor MySQL or MariaDB Using Netdata in Linux. For more information, please follow other related articles on the PHP Chinese website!

LinuxandWindowsmanagememorydifferentlyduetotheirdesignphilosophies.Linuxusesovercommittingforbetterperformancebutrisksout-of-memoryerrors,whileWindowsemploysdemand-pagingandmemorycompressionforstabilityandefficiency.Thesedifferencesimpactdevelopmenta

Linux systems rely on firewalls to safeguard against unauthorized network access. These software barriers control network traffic, permitting or blocking data packets based on predefined rules. Operating primarily at the network layer, they manage

Determining if your Linux system is a desktop or laptop is crucial for system optimization. This guide outlines simple commands to identify your system type. The hostnamectl Command: This command provides a concise way to check your system's chassis

Guide to adjust the number of TCP/IP connections for Linux servers Linux systems are often used in servers and network applications. Administrators often encounter the problem that the number of TCP/IP connections reaches the upper limit, resulting in user connection errors. This article will guide you how to improve the maximum number of TCP/IP connections in Linux systems. Understanding TCP/IP connection number TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication protocol of the Internet. Each TCP connection requires system resources. When there are too many active connections, the system may reject new connections or slow down. By increasing the maximum number of connections allowed, server performance can be improved and more concurrent users can be handled. Check the current number of Linux connections limits Change settings

SVG (Scalable Vector Graphics) files are ideal for logos and illustrations due to their resizability without quality loss. However, PNG (Portable Network Graphics) format often offers better compatibility with websites and applications. This guide d

LiveCode: A Cross-Platform Development Revolution LiveCode, a programming language debuting in 1993, simplifies app development for everyone. Its high-level, English-like syntax and dynamic typing enable the creation of robust applications with ease

This guide provides a step-by-step process for resetting a malfunctioning USB device via the Linux command line. Troubleshooting unresponsive or disconnected USB drives is simplified using these commands. Step 1: Identifying Your USB Device First, i

Temporarily setting a static IP address on Linux is invaluable for network troubleshooting or specific session configurations. This guide details how to achieve this using command-line tools, noting that the changes are not persistent across reboots


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
