Jira
From Server Knowledge Base
Check version of Jira on Linux/Unix via command line
This is specifically for if you are using a MySQL database.
select * from propertystring where id = (select id from propertyentry where property_key = 'jira.version');