mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
7f7d02a104
@ -1,51 +0,0 @@
|
||||
translating---geekpi
|
||||
|
||||
Linux FAQs with Answers--How to check MariaDB server version
|
||||
================================================================================
|
||||
> **Question**: I am on a VPS server where MariaDB server is running. How can I find out which version of MariaDB server it is running?
|
||||
|
||||
There are circumstances where you need to know the version of your database server, e.g., when upgrading the database or patching any known server vulnerabilities. There are a few ways to find out what the version of your MariaDB server is.
|
||||
|
||||
### Method One ###
|
||||
|
||||
The first method to identify MariaDB server version is by logging in to the MariaDB server. Right after you log in, your will see a welcome message where MariaDB server version is indicated.
|
||||
|
||||
![](https://farm6.staticflickr.com/5807/20669891016_91249d3239_c.jpg)
|
||||
|
||||
Alternatively, simply type 'status' command at the MariaDB prompt any time while you are logged in. The output will show server version as well as protocol version as follows.
|
||||
|
||||
![](https://farm6.staticflickr.com/5801/20669891046_73f60e5c81_c.jpg)
|
||||
|
||||
### Method Two ###
|
||||
|
||||
If you don't have access to the MariaDB server, you cannot use the first method. In this case, you can infer MariaDB server version by checking which MariaDB package was installed. This works only when the MariaDB server was installed using a distribution's package manager.
|
||||
|
||||
You can search for the installed MariaDB server package as follows.
|
||||
|
||||
#### Debian, Ubuntu or Linux Mint: ####
|
||||
|
||||
$ dpkg -l | grep mariadb
|
||||
|
||||
The output below indicates that installed MariaDB server is version 10.0.17.
|
||||
|
||||
![](https://farm1.staticflickr.com/607/20669890966_b611fcd915_c.jpg)
|
||||
|
||||
#### Fedora, CentOS or RHEL: ####
|
||||
|
||||
$ rpm -qa | grep mariadb
|
||||
|
||||
The output below indicates that the installed version is 5.5.41.
|
||||
|
||||
![](https://farm1.staticflickr.com/764/20508160748_23d9808256_b.jpg)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/check-mariadb-server-version.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
@ -0,0 +1,49 @@
|
||||
Linux有问必答--如何检查MatiaDB服务端版本
|
||||
================================================================================
|
||||
> **提问**: 我使用的是一台运行MariaDB的VPS。我该如何检查MariaDB服务端的版本?
|
||||
|
||||
你需要知道数据库版本的情况有:当你生你数据库或者为服务器打补丁。这里有几种方法找出MariaDB版本的方法。
|
||||
|
||||
### 方法一 ###
|
||||
|
||||
第一种找出版本的方法是登录MariaDB服务器,登录之后,你会看到一些MariaDB的版本信息。
|
||||
|
||||
![](https://farm6.staticflickr.com/5807/20669891016_91249d3239_c.jpg)
|
||||
|
||||
另一种方法是在登录MariaDB后出现的命令行中输入‘status’命令。输出会显示服务器的版本还有协议版本。
|
||||
|
||||
![](https://farm6.staticflickr.com/5801/20669891046_73f60e5c81_c.jpg)
|
||||
|
||||
### 方法二 ###
|
||||
|
||||
如果你不能访问MariaDB,那么你就不能用第一种方法。这种情况下你可以根据MariaDB的安装包的版本来推测。这种方法只有在MariaDB通过包管理器安装的才有用。
|
||||
|
||||
你可以用下面的方法检查MariaDB的安装包。
|
||||
|
||||
#### Debian、Ubuntu或者Linux Mint: ####
|
||||
|
||||
$ dpkg -l | grep mariadb
|
||||
|
||||
下面的输出说明MariaDB的版本是10.0.17。
|
||||
|
||||
![](https://farm1.staticflickr.com/607/20669890966_b611fcd915_c.jpg)
|
||||
|
||||
#### Fedora、CentOS或者 RHEL: ####
|
||||
|
||||
$ rpm -qa | grep mariadb
|
||||
|
||||
下面的输出说明安装的版本是5.5.41。
|
||||
|
||||
![](https://farm1.staticflickr.com/764/20508160748_23d9808256_b.jpg)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/check-mariadb-server-version.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://ask.xmodulo.com/author/nanni
|
Loading…
Reference in New Issue
Block a user