Topics:
DVR
nvrec
Mplayer
Links
Misc
Commands
Humor
New user
uploaded files
|
(links)-> (Parent)->find out version of mysql in linux machine via command line or query |
submited by Russell Thu 19 Jan 06 Edited Sat 31 Mar 12 |
In responce to: "
find out version of mysql in linux machine via command line"
To get the version number from the command line use:
mysql -V
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
This is the version of the client you have installed. Typcialy the server and the client should be the same version. You can check all the files with the rpm command:
rpm -q --all |grep mysql
php-mysql-4.3.11-2.8
mysql-devel-3.23.58-16.FC3.1
mod_auth_mysql-20030510-5
mysql-3.23.58-16.FC3.1
mysql-bench-3.23.58-16.FC3.1
libdbi-dbd-mysql-0.6.5-9
mysql-server-3.23.58-16.FC3.1
These commands should work on any rpm based product ( Redhat , Fedora Core 1,2,3,4 ... , RHEL 1,2,3,4 ... )
Another way to figure out the version of the server is to connect to it. ( this will work even if the server isn't local, so long as you have access)
mysql -u username -h servername -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3491937 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
The Version number of the server is displayed on the welcome message.
Now if you want an application to be able to make choices based on the my sql version number you can also query the server for it's version number.
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.0.86 |
+-----------+
1 row in set (0.00 sec)
mysql>
|
Add comment or question...:
|