> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/plugins/other-plugins/mysql_json.md).

# 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" %}
