# MYSQL\_JSON

{% hint style="info" %}
The `TYPE_MYSQL_JSON` plugin is available from [MariaDB 10.5.7](/docs/release-notes/community-server/old-releases/10.5/10.5.7.md).
{% endhint %}

The JSON type in MySQL stores the JSON object in its own native form, while, in MariaDB, the [JSON type](/docs/server/reference/data-types/string-data-types/json.md) is a [LONGTEXT](/docs/server/reference/data-types/string-data-types/longtext.md). Opening a table with a JSON type created in MySQL results in an error:

```sql
SELECT * FROM mysql_json_table;
ERROR 4161 (HY000): Unknown data type: 'MYSQL_JSON'
```

The `mysql_json` plugin is used to make it easier to upgrade to MariaDB.

## Installing

Installing can be done in a [number of ways](/docs/server/reference/plugins/plugin-overview.md#installing-a-plugin), for example:

```sql
INSTALL SONAME 'type_mysql_json';
```

See [Making MariaDB understand MySQL JSON](https://mariadb.org/making-mariadb-understand-mysql-json/) for a full description.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @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/plugins/other-plugins/mysql_json.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.
