> 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

The MYSQL\_JSON plugin provides a JSON data type alias for compatibility, ensuring that tables created with the MySQL JSON type can be read by MariaDB.

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