I need to extract the mysql version in a bash script on CentOS 6 for a minimum requirements check
Example:
# mysql -V
mysql Ver 14.14 Distrib 5.5.43, for Linux (x86_64) using readline 5.1
# mysql -V
mysql Ver 14.14 Distrib 5.6.24, for Linux (x86_64) using EditLine wrapper
Should I use something like mysql -V| grep ...
?