
There are two ways of getting MySQL version in WordPress. First (popular) is to use $wpdb
global object and its db_version()
method. Second (less known) is to use $wpdb
global object combined with its two properties use_mysqli and
dbh
plus two PHP functions mysql_get_server_info()
and mysqli_get_server_info()
.