
- 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
How To Check MySQL Version
Let us understand how to check the version of MySQL that the user is currently running −
Before entering queries on the console, it is important to ensure that the user is connected to the server.
Check MySQL Version
The below query would give the version number of the server being used, and the current date.
mysql> SELECT VERSION(), CURRENT_DATE;
Note: The function ‘VERSION()’ and ‘CURRENT_DATE’ are case −insensitive. This means ‘version()’, ‘Version()’, ‘vERsion()’, all mean the same. Same goes with ‘CURRENT_DATE’
Queries
Learn about MySQL Queries
An SQL query is followed by a semi−colon.
When a query is issued to mysql, it sends the query to the server for execution. The results are computed and displayed. Another ‘mysql>’ also gets printed, indicating that the server is ready for one more query.
The output after executing the mysql query is in tabular form, i.e rows and columns. The first row contains the name of the columns. The remaining rows are the query results.
Once the query is executed, ‘mysql’ also gives the number of rows that were returned, the amount of time taken to execute the query. This gives the user a rough idea about the performance of the server.
MySQL server can also be used to execute multiple statement in a single line. It has been shown below −
mysql > SELECT VERSION(); SELECT NOW();
- Related Articles
- How can I check the version of MySQL Server?
- How to check version of python modules?
- How to check the system version of Android?
- How to check the OS version in Swift?
- SQL query to check SAP HANA system version
- 4 Ways to Check CentOS or RHEL Version
- Which MySQL Version and Distribution to Install?
- How to check the PowerShell version installed in local and remote systems?
- Which version is my MySQL?
- How I can check a Python module version at runtime?
- Fix MySQL ERROR 1064 (42000) check the manual that corresponds to your MySQL server version for the right syntax to use near ')'
- How to install the specific version of the PowerShell module version?
- How to check privileges in MySQL?
- How do I check what version of Python is running my script?
- How to resolve the MySQL error “You have an error in your SQL syntax; check the manual\nthat corresponds to your MySQL server version for the right syntax to use near?”
