Exploring the MySQL Daemon – A Guide


Subqueries are a part of the life of every DBA. Everyone knows that subqueries are just that – they’re queries within queries, but they’re actually so much more than that. Intrigued? This blog will walk you through everything you need to know about them – have a read!

Tools used in the tutorial
Tool Description Link
MySQL logo MYSQL 8.0+

The MySQL Daemon Explained

The MySQL daemon, or mysqld for short, is one of the primary tools within the arsenal of any MySQL DBA – the daemon allows for working with MySQL by invoking scripts inside of MySQL’s /var/lib/mysql*.*.** (*.*.** is your MySQL version) folder – these scripts do look differently depending on what operating system is in use (a Windows example of these files can be seen below), but nonetheless, they were all made to accomplish the same purpose – they can (and should) be run via the CLI to solve database performance, management, capacity, availability, or security issues.

Executable files relevant to MySQL 5.7.36.
Executable files relevant to MySQL 5.7.36.

Here’s how the MySQL daemon looks like when launched by a user (bear in mind that the daemon should be launched only after you’ve successfully navigated to the binary folder in MySQL and not before – there are no executable files pertaining to MySQL elsewhere):

The MySQL daemon on a Windows architecture.
The MySQL daemon on a Windows architecture.

The core reason the MySQL daemon exists is to let us get deeply involved into MySQL’s functionality under the hood – since the daemon can be launched from the bin folder, the bin folder also consists of all of the rest of the files that are relevant for MySQL to function normally including, but not limited to:

  • innochecksum which is an offline checksum utility for the InnoDB storage engine.
  • myisam_ftdumpmyisamchkmyisamlog and other tools relevant to the (now obsolete) MyISAM storage engine within MySQL.
  • mysqlbinlog which is an offline utility aimed at making the processing of binary log files as fast and efficient as possible.
  • mysqlcheck which is a tool that helps MySQL DBAs perform database maintenance routines.
  • Functions like mysqlshowmysqlslapperrorreplaceresolveip, or zlib_decompress – each of them complete different things and can be used for stress-testing, replacing one string with another, IP resolving, or even get a quick glance on which databases, tables, or columns within them exist within MySQL’s infrastructure.

One of the most prominent database load emulation clients, mysqlslap, can be used like so (see example below for the results):

$ mysqlslap [options]

On the mysqlslap front alone, the list of available options can include:

  • concurrency option that specifies how many queries should run.
  • An iterations option that specifies the amount of iterations intended to run by mysqlslap (the recommended number is 10 or above.)
  • Options like number-int-cols or number-char-cols that define how many columns related to characters or integer values should MySQL work with.
  • Some users might also consider specifying the --auto-generate-sql option to let MySQL automatically generate SQL queries that it will “slap itself” with.
The usage of mysqlslap through mysqld.
The usage of mysqlslap through mysqld.

The same goes for all other CLI-based tools within the infrastructure of MySQL – even the tools relevant to the now-obsolete MySQL’s storage engine, MyISAM (the myisam_ftdump tool was used to gain information on all fulltext indexes centered around the MyISAM storage engine within the database management system):


For everything daemon related, though, users should also consider running it together with the --help option like so (this option will provide a list of all of the available commands relevant to the daemon itself. The --verbose option will act as sort of a documentation within the CLI itself):

A part of the output of mysqld --help --verbose
A part of the output of mysqld --help --verbose

The verbose output of the MySQL daemon should tell you enough about what it’s capable of doing – for many of us, though, its functionality can get a little overbearing since even the most experienced DBAs elect to use 4-5 tools that they know best, and they dedicate the rest to tools dedicated to professionals.

Accompanying mysqld – DbVisualizer

The verbose output of the MySQL daemon is very good, but for those who need to explore their data in the form of Excel spreadsheets, have powerful visualization options, and offer simple, but powerful SQL editors while at the same securing our data with industry-standard best practices, the daemon will not be enough. Such people such turn to tools like DbVisualizer – DbVisualizer is built by some of the smartest people in the Swedish database space and it’s used by well-known companies such as Netflix, Apple, Uber, Citibank, Siemens and even Visa.

Dbvis download link img

There is a good reason why all of the aforementioned companies elect to use DbVisualizer as their primary SQL client – the tool offers a 30-day evaluation period, it’s loaded with powerful performance and security features, and makes working with your most precious data a breeze: did we mention that it supports all of the most popular database management systems as well as most of the exotic choices like Cassandra, NuoDB, MimerSQL, Elasticsearch and the like?

Here’s how part of the visualization process of your databases look like should you elect to use DbVisualizer as your primary database and SQL client:

Visualizing data with DbVisualizer.
Visualizing data with DbVisualizer.

Impressive, isn’t it? And we’re far from done – as you can already notice, DbVisualizer can also provide very valuable information centered around the indexes on the table, its DDL structure, and other things, so make sure to try it today! We recommend familiarizing yourself with the documentation of DbVisualizer alongside with the functions relevant to the MySQL daemon for the best results.


In this blog, we’ve walked you through some of the features offered by the MySQL daemon – mysqld for short. The MySQL daemon is one of the primary tools concerning all MySQL database administators across the globe as it’s primary purpose is to launch tools within MySQL to help DBAs solve their most pressing issues. We hope that this blog helped you solve some of your issues and taught you something new – we will see you in the next one, but before then, make sure to explore our blog and grab a free trial of DbVisualizer as well – you don’t want to miss out on all of the goodness, do you?

Frequently Asked Questions

What Is mysqld?

Mysqld stands for MySQL daemon – the MySQL daemon is the principal tool to control our databases via the CLI as well as to execute scripts inside of them.

How Does mysqld Work?

The MySQL daemon works by executing the scripts in our /var/lib/mysql/mysql*.*.** folder (if we’re using Windows, that folder can be found over at the /bin/mysql/mysql*.*.**/bin folder – *.*.** refers to our MySQL version.)

When Do I Need to Use mysqld?

Whenever you feel like executing scripts that exist within MySQL.

mysqld Doesn’t Solve All of My Issues and I’d Like to Explore Different Solutions As Well – Where Can I Do That?

If you find that the tools that can be launched through the daemon aren’t sufficient to solve your specific problems, give SQL clients like DbVisualizer a go – they’re usually more than able to put your databases on the performance, capacity, security, and availability highways no matter what database management system you might find yourself using.

About the author
Lukas Vileikis
Lukas Vileikis is an ethical hacker and a frequent conference speaker. He runs one of the biggest & fastest data breach search engines in the world - BreachDirectory.com, frequently speaks at conferences and blogs in multiple places including his blog over at lukasvileikis.com.
The Table Icon
Sign up to receive The Table's roundup
More from the table
Title Author Tags Length Published

SQL Alias: Everything You Need to Know About AS in SQL

author Antonello Zanini tags MySQL ORACLE POSTGRESQL SQL SQL SERVER 7 min 2024-07-15

How to Compare SQL Dates

author Antonello Zanini tags MySQL ORACLE POSTGRESQL SQL SQL SERVER 4 min 2024-07-11

Types of Databases Explained

author Lukas Vileikis tags MySQL 6 min 2024-07-01


author Lukas Vileikis tags MySQL SQL 7 min 2024-06-27

Error: MySQL Shutdown Unexpectedly. Causes & Solutions

author Lukas Vileikis tags MySQL SQL 4 min 2024-06-24

Primary Key vs. Foreign Key: A Complete Comparison

author Lukas Vileikis tags MySQL POSTGRESQL SQL SQL SERVER 7 min 2024-06-20

A Complete Guide to the SQL LIKE Operator

author Antonello Zanini tags MySQL ORACLE POSTGRESQL SQL SQL SERVER 8 min 2024-06-17

MySQL IFNULL - Everything You Need to Know

author Leslie S. Gyamfi tags IFNULL MySQL 6 min 2024-06-13

mysqldump: How to Backup and Restore MySQL Databases

author Antonello Zanini tags Backup MySQL SQL 11 min 2024-06-06

A Guide to the SQL Date Data Types

author Antonello Zanini tags MySQL ORACLE POSTGRESQL SQL SQL SERVER 10 min 2024-05-30

The content provided on dbvis.com/thetable, including but not limited to code and examples, is intended for educational and informational purposes only. We do not make any warranties or representations of any kind. Read more here.

Cookie policy

We use cookies to ensure that we give you the best experience on our website. However you can change your cookie settings at any time in your browser settings. Please find our cookie policy here ↗