# VERSION

## Syntax

```sql
VERSION()
```

## Description

Returns a string that indicates the MariaDB server version. The string uses the utf8 [character set](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets).

## Examples

```sql
SELECT VERSION();
+----------------+
| VERSION()      |
+----------------+
| 10.4.7-MariaDB |
+----------------+
```

The `VERSION()` string may have one or more of the following suffixes:

| Suffix    | Description                                                               |
| --------- | ------------------------------------------------------------------------- |
| -embedded | The server is an embedded server (libmariadbd).                           |
| -log      | General logging, slow logging or binary (replication) logging is enabled. |
| -debug    | The server is compiled for debugging.                                     |
| -valgrind | The server is compiled to be instrumented with valgrind.                  |

## Changing the Version String

Some old legacy code may break because they are parsing the`VERSION` string and expecting a MySQL string or a simple version string like Joomla til API17, see [MDEV-7780](https://jira.mariadb.org/browse/MDEV-7780).

You can fool these applications by setting the version string from the command line or the `my.cnf` files with [--version=...](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#version).

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/version.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
