job.answiz.com
  • 8
Votes
name
name Punditsdkoslkdosdkoskdo

How to check my PHP & MySQL version on Ubuntu VPS?

HI I am going to install MyBB but I am not sure whether I have installed the correct version of PHP and MySQL.

PHP version 5.1.0 or above with XML Extension installed

MySQL version 4.0 or above

How to check that? Especiall the PHP XML Extension?

Is there simpler way than the <?php phpinfo() ?> solution? I am expecting a command line solution.

Thanks a lot!

Any one of these queries will tell you what the MySQL version running is once connected:

SELECT VERSION();

SHOW VARIABLES LIKE 'version';

This works for MySQL 5.1+

SELECT variable_value FROM information_schema.global_variables
WHERE variable_name='version';

Doing the following from the command line:

mysql -V will get you the version of the client.

mysqld -V will get you the version of the server.

  • 1
Reply Report