Add MySQL AWS RDS support to mysqldump

This commit is contained in:
Noah Zalev 2021-11-17 19:12:18 -05:00
parent c5c27820c9
commit c3b9de37f9
2 changed files with 3 additions and 1 deletions

3
db.js
View File

@ -1973,10 +1973,11 @@ module.exports.CreateDB = function (parent, func) {
if (props.host) { cmd += ' -h ' + props.host; }
if (props.port) { cmd += ' -P ' + props.port; }
if (props.awsrds) { cmd += ' --single-transaction'; }
// SSL options different on mariadb/mysql
var sslOptions = '';
if (obj.databaseType == 4) {
if (props.awsrds) { cmd += ' --single-transaction'; }
if (props.ssl) {
sslOptions = ' --ssl';
if (props.ssl.cacertpath) sslOptions = ' --ssl-ca=' + props.ssl.cacertpath;

View File

@ -44,6 +44,7 @@
"user": { "type": "string", "description": "MySQL username" },
"password": { "type": "string", "description": "MySQL password" },
"database": { "type": "string", "default": "meshcentral", "description": "Name of MySQL database used" },
"awsrds": { "type": "boolean", "default": false, "description": "Set true to resolve LOCK TABLE permissions on AWS RDS." },
"ssl": {
"type": "object",
"description": "SSL Options. Set to true (boolean) for default options.",