Using either a SQL query, or some php code, how can I determine which version of MySQL is running. I found several examples of using the command line, but I need to check programmatically.
I tried
SELECT @version;
But that returned NULL.
I did search stack overflow, and found a lot of questions, but they were about other dbs or programming languages. I didn't find any specifically for MySQL.