<p> 1:在终端下:mysql -V。 以下是代码片段:</p><p> [shengting@login ~]$ mysql -V</p><p> mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)</p><p> 2:在mysql中:mysql> status;</p><p> 以下是代码片段:</p><p> mysql> status;</p><p> --------------</p><p> mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)</p><p> Connection id: 416</p><p> SSL: Not in use</p><p> Current pager: stdout</p><p> Using outfile: ''</p><p> Using delimiter: ;</p><p> Server version: 3.23.56-log</p><p> Protocol version: 10</p><p> Connection: Localhost via UNIX socket</p><p> Client characterset: latin1</p><p> Server characterset: latin1</p><p> UNIX socket: /tmp/mysql_3311.sock</p><p> Uptime: 62 days 21 hours 21 min 57 sec</p><p> Threads: 1 Questions: 584402560 Slow queries: 424 Opens: 59664208 Flush tables: 1 Open tables: 64 Queries per second avg: 107.551</p><p> 3:在help里面查找</p><p> 以下是代码片段:</p><p> [shengting@login ~]$ mysql --help | grep Distrib</p><p> mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)</p><p> 4:使用mysql的函数</p><p> 以下是代码片段:</p><p> mysql> select version();</p><p> +-------------+</p><p> | version() |</p><p> +-------------+</p><p> | 3.23.56-log |</p><p> +-------------+</p><p> 1 row in set (0.00 sec)</p>