Mysql查看版本号的五种方式介绍

<p>查看版本信息</p><p>#1使用命令行模式进入mysql会看到最开始的提示符</p><pre class="brush:bash;toolbar:false">YourMySQLconnectionidis3 Serverversion:5.1.69Sourcedistribution</pre><p>#2命令行中使用status可以看到</p><pre class="brush:bash;toolbar:false">mysql&gt;status; -------------- mysqlVer14.14Distrib5.1.69,forredhat-linux-gnu(x86_64)usingreadline5.1 Connectionid:3 Currentdatabase: Currentuser:root@localhost SSL:Notinuse Currentpager:stdout Usingoutfile:&#39;&#39; Usingdelimiter:; Serverversion:5.1.69Sourcedistribution Protocolversion:10 Connection:LocalhostviaUNIXsocket Servercharacterset:utf8 Dbcharacterset:utf8 Clientcharacterset:utf8 Conn.characterset:utf8 UNIXsocket:/var/lib/mysql/mysql.sock Uptime:3days14hours50sec Threads:1Questions:5Slowqueries:0Opens:15Flushtables:1Opentables:8Queriespersecondavg:0.0</pre><p>#3 使用系统函数</p><pre class="brush:bash;toolbar:false">mysql&gt;selectversion(); +-----------+ |version()| +-----------+ |5.1.69| +-----------+ 1rowinset(0.12sec)</pre><p>#4 $ mysql --help | grep Distrib</p><pre class="brush:bash;toolbar:false">mysqlVer14.14Distrib5.1.69,forredhat-linux-gnu(x86_64)usingreadline5.1</pre><p>#5 包管理工具(根据不同系统 rh系列或则是bsd系列)</p><pre class="brush:bash;toolbar:false">$rpm-qa|grepmysql qt-mysql-4.6.2-20.el6.x86_64 mysql-server-5.1.69-1.el6_4.x86_64 mysql-libs-5.1.69-1.el6_4.x86_64 mysql-5.1.69-1.el6_4.x86_64 mysql-devel-5.1.69-1.el6_4.x86_64</pre>
RangeTime:0.006385s
RangeMem:205.08 KB
返回顶部 留言