show variables like '%version%';

数据库版本结果:

"protocol_version","10"
"version","5.0.45-log"
"version_comment","MySQL Community Server (GPL)"
"version_compile_machine","i686"
"version_compile_os","pc-linux-gnu"
05-04 05:20