
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
MySQL command for display current configuration variables?
You can use SHOW VARIABLES command to display current configuration variables. The syntax is as follows −
SHOW VARIABLES;
If you want any specific information, then implement the LIKE operator. The syntax is as follows −
SHOW VARIABLES LIKE ‘%AnySpecificInformation%’;
Now we will implement the above syntax −
mysql> show variables like '%variable%';
The following is the output −
+--------------------------------+------------------------------------------------------------------------------------------+ | Variable_name | Value | +--------------------------------+------------------------------------------------------------------------------------------+ | session_track_system_variables | time_zone,autocommit,character_set_client,character_set_results,character_set_connection | +--------------------------------+------------------------------------------------------------------------------------------+ 1 row in set (0.01 sec)
You can also get the host information. The query is as follows −
mysql> show variables like '%host%';
The following is the output −
+-------------------------------+-----------------+ | Variable_name | Value | +-------------------------------+-----------------+ | host_cache_size | 279 | | hostname | DESKTOP-QN2RB3H | | performance_schema_hosts_size | -1 | | report_host | | +-------------------------------+-----------------+ 4 rows in set (0.00 sec)
- Related Articles
- MySQL command for displaying current configuration variables?
- Display different variables in MySQL using LIKE?
- How to Display System Variables of MySQL Server?
- How to adjust display settings of MySQL command line?
- How to display records vertically in MySQL command line?
- How to display current connection info in MySQL?
- Display Timestamp before the current date in MySQL
- MySQL command line client for Windows?
- What is MySQL TRUNCATE command used for?
- What is MySQL DROP command used for?
- What is MySQL DELETE command used for?
- MySQL query to discover current default database collation (via command line client)?
- Display all records ignoring the current date record in MySQL
- How to check the current configuration of MongoDB?
- Command Options for Connecting to the MySQL Server

Advertisements