How to fetch database version through terminal

Connect the mysql server with credentials

mysql -u username -p

Enter the password

Choose the database and run the command.

use yourdatabase;

Run the query

SELECT option_value FROM yourdatabase.wp_options WHERE option_name = ‘db_version’;

Leave a comment

Your email address will not be published. Required fields are marked *