mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
feat(credential): add credential of mysql node
This commit is contained in:
parent
d74f0d9bbd
commit
040b0a690c
45
packages/nodes-base/credentials/MySQL.credentials.ts
Normal file
45
packages/nodes-base/credentials/MySQL.credentials.ts
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
import {
|
||||||
|
ICredentialType,
|
||||||
|
NodePropertyTypes,
|
||||||
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
|
|
||||||
|
export class MySQL implements ICredentialType {
|
||||||
|
name = 'mysql';
|
||||||
|
displayName = 'MySQL';
|
||||||
|
properties = [
|
||||||
|
{
|
||||||
|
displayName: 'Host',
|
||||||
|
name: 'host',
|
||||||
|
type: 'string' as NodePropertyTypes,
|
||||||
|
default: 'localhost',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Database',
|
||||||
|
name: 'database',
|
||||||
|
type: 'string' as NodePropertyTypes,
|
||||||
|
default: 'mysql',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'User',
|
||||||
|
name: 'user',
|
||||||
|
type: 'string' as NodePropertyTypes,
|
||||||
|
default: 'mysql',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Password',
|
||||||
|
name: 'password',
|
||||||
|
type: 'string' as NodePropertyTypes,
|
||||||
|
typeOptions: {
|
||||||
|
password: true,
|
||||||
|
},
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Port',
|
||||||
|
name: 'port',
|
||||||
|
type: 'number' as NodePropertyTypes,
|
||||||
|
default: 3306,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
|
@ -52,6 +52,7 @@
|
||||||
"dist/credentials/MandrillApi.credentials.js",
|
"dist/credentials/MandrillApi.credentials.js",
|
||||||
"dist/credentials/MattermostApi.credentials.js",
|
"dist/credentials/MattermostApi.credentials.js",
|
||||||
"dist/credentials/MongoDb.credentials.js",
|
"dist/credentials/MongoDb.credentials.js",
|
||||||
|
"dist/credentials/MySQL.credentials.js",
|
||||||
"dist/credentials/NextCloudApi.credentials.js",
|
"dist/credentials/NextCloudApi.credentials.js",
|
||||||
"dist/credentials/OpenWeatherMapApi.credentials.js",
|
"dist/credentials/OpenWeatherMapApi.credentials.js",
|
||||||
"dist/credentials/PipedriveApi.credentials.js",
|
"dist/credentials/PipedriveApi.credentials.js",
|
||||||
|
|
Loading…
Reference in a new issue