This is database adapter to add support of MySQL to Parse Server
Runs on Parse-Server 2.5.0+ Runs on MySQL >= 5.7.
Create one Database using the MySQL CLI or Query Expression Editor on your MySQL instance.
mysql> CREATE DATABASE `database_here`
const uri = 'mysql://root@localhost:3306/database_here';
const { MySQL } = require('parse-server-mysql-adapter');
const mysql = new MySQL(uri);
var api = new ParseServer({
databaseAdapter: mysql.getAdapter(),
appId: 'myAppId',
masterKey: 'myMasterKey'
serverURL: 'http://localhost:1337/parse'
...
});
This adapter is backwards compatible with node-mysql
. You can pass connection options into the adapter.
You can find a list of available options here
Just like other databases MySQL has also some limits that are documented here
Please remember MySQL has recently added a JSON Type in version 5.7. This adapter tried its best to simulate how Parse Server works with other Databases like Postgres, however these features or functions won't work as you expect. Features including JSON and Array will be improved in future updates.
- Removing From Array : You can only
remove
strings from array and only one. - Regex : Limited support for regex.
You can enable verbose logging with environment variables:
VERBOSE=1
or
VERBOSE_PARSE_SERVER_MYSQL_ADAPTER=1