It would be great if you could unify both files and just add configuration switches like

    var useMysql = 1;
    if (useMyysql) {
    ...
    } else {
    ...
    }