Oh be careful - that is a VERY dangerous question. Do you mean "what version is my MySQL server" or "what version of the mysql client program am I running?" I'll show you how to find answers to both questions.
What version is my MySQL server?
Use the
select command, and run the
version function within it:
mysql> select version();
+-------------+
| version() |
+-------------+
| 5.0.51a-log |
+-------------+
1 row in set (0.02 sec)
Your MySQL server is the program that's know as mysqldand is run as a daemon (linux / unix term) or service (Windows term). It may be run directly, or instigated via a scripts such as mysqld_safe or safe_mysqld
What version of the mysql client am I running?
Simply run the mysql client with the -V (that's a capital V) option:
-bash-3.2$ mysql -V
mysql Ver 14.12 Distrib 5.0.45,
for redhat-linux-gnu (i386) using readline 5.0
-bash-3.2$
The mysql client program is a small utility that lets you type in SQL commands at the keyboard and have them routed to the mysql server, and then handles and displays the results. It's ironic that the program that bears the name of the product (mysql) is such a tiny part of the whole!
(written 2009-09-26)
Associated topics are indexed under
S050 - MySQL - General [3361] Blowing our own trumpet - MySQL resources - (2011-07-18)
[2861] MySQL and Java - connectivity past, present, and future thoughts - (2010-07-09)
[2567] Extra MySQL course dates (2 day course, UK) - (2010-01-08)
[2561] The future of MySQL - (2010-01-03)
[2559] Moving the product forward - ours, and MySQL, Perl, PHP and Python too - (2010-01-01)
[2240] How do I query a database (MySQL)? - (2009-06-15)
[2134] Oracle take over Sun who had taken over MySQL - (2009-04-21)
[2085] MySQL - licensing issues, even with using the name - (2009-03-16)
[2053] What a difference a MySQL Index made - (2009-02-25)
S153 - Sourcing, Running and Configuring MySQL [2458] Cant connect to local MySQL server through socket /tmp/mysql.sock - (2009-10-17)
[2445] Securing MySQL on a production server - (2009-10-09)
[2444] Potted MySQL installation - (2009-10-09)
[2209] Monitoring and Tuning your MySQL installation - (2009-05-31)
[1935] Summary of MySQL installation on a Linux system - (2008-12-11)
[1771] More HowTo diagrams - MySQL, Tomcat and Java - (2008-08-24)
[1731] Apache httpd, MySQL, PHP - installation procedure - (2008-08-01)
[1689] Some sideways thoughts on the news - (2008-06-27)
[1131] MySQL - Password security (authentication protocol) - (2007-04-02)
[1123] mysqldump and mysqlrestore - (2007-03-30)
[1095] Apache httpd , browser, MySQL and MySQL client downloads - (2007-02-28)
[907] Browser -> httpd -> Tomcat -> MySQL. Restarting. - (2006-10-28)
[591] Key facts - SQL and MySQL - (2006-02-04)
[535] MySQL permissions and privileges - (2005-12-20)
[515] MySQL - an FAQ - (2005-12-03)
[489] Which MySQL server am I using? - (2005-11-07)
[334] Symbolic links and hard links - (2005-06-02)
[192] Current MySQL and PHP paths and upgrades - (2005-01-28)
Some other Articles
Not just a PHP program - a good web applicationTcl scripts / processes on a web server via CGIDiluting HistoryOperator overloading - redefining addition and other Perl tricksWhich version of MySQL am I running?Weekend and Christmas Promotion - Well House Manor Hotel, MelkshamA Winter Weekend Special at Well House ManorWhat is a JVM, a JRE, a JDK - components of the core Java EnvironmentLooking inside Java classes - javap and javadocSorting Collections of Objects in Java