Understanding the sys.ps_is_thread_instrumented() Function in MySQL

In MySQL, we can use the sys.ps_is_thread_instrumented() function to check whether Performance Schema instrumentation for a given connection ID is enabled.

The function returns YES or NO, depending on whether the instrumentation is enabled for the given connection. It can also return UNKNOWN if the connection ID is unknown, and NULL if the connection ID is NULL.

Read more

How to Select Rows Where a Column is NULL in SQL

When learning SQL, a common mistake when checking for NULL values is to use an equality operator. In SQL, a NULL value is treated a bit differently to other values.

In SQL we use IS NULL instead of = NULL. Likewise, we use IS NOT NULL instead of <> NULL or != NULL to select those columns that don’t have a NULL value.

Read more

3 Ways to Get the Data Directory in MySQL

In MySQL, the data directory stores information managed by the MySQL server. Each subdirectory of the data directory is a database directory and corresponds to a database managed by the server.

If you ever need to find out where the data directory is located on your MySQL implementation, below are some options to try.

Read more