Typing the
mysql --version
command in a Linux shell, I got the following:
mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
The number 5.0.77 obviously refers to the known version number of MySQL. What does 14.12 mean?
Is this documented/explained anywhere?
To check the version your MySQL is running, type and execute mysql -V (note the uppercase V) in the command line. As you can see, the MySQL version for this system is 10.4. 12.
MySQL is offered under two different editions: the open source MySQL Community Server and the proprietary Enterprise Server.
We recommend using the most recent GA release. The naming scheme in MySQL 5.6 uses release names that consist of three numbers and an optional suffix; for example, mysql-5.6.
Ver refers to the version of the mysql command line client - what you are envoking by typing 'mysql'
Distrib refers to the mysql server version your client was built with. This is not to be confused with the mysql server you are connected to, which can be obtained with SELECT VERSION();
The mysql client (what you are evoking) is distributed with the server, and, AFAIK, there is no easy way to build it on it's own.
I can't find any documentation for this either, so the source is the only 'source' of documentation.
First stop: client/mysql.cc: the mysql client.
static void usage(int version) { ... printf("%s Ver %s Distrib %s, for %s (%s) using %s %s\n", my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE, readline, rl_library_version);
As you see, it uses the constants VER for "14.12" and MYSQL_SERVER_VERSION for "5.0.77"
Where are these constants defined?, is the question.
VER is defined near the top (line 51 in my source) of client/mysql.cc as a constant at run time.
const char *VER= "14.14";
And I would assume, updated by hand or by a checkin process. This is very likely the version of the 'client' because it's right there in the client code.
MYSQL_SERVER_VERSION is defined in include/mysql_version.h (line 12) which is used for both the client and server (mysql / mysqld)
#define MYSQL_SERVER_VERSION "5.1.56"
(it's actually set in the configure script and substituted in at configure time)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With