Under Ubuntu 16.04 this helps:
$ sudo apt-get install php7.0-cli php-seclib php-gettext php7.0-mbstring
Arc is a flat theme with a subtle color scheme and transparency in select parts of the window, like GTK Header Bars and the Nautilus sidebar.
The Arc theme supports GTK3 and GTK2 based desktop environments, including GNOME Shell (of course) and the standard Ubuntu Unity desktop.
It also works just dandy with lightweight Budgie and elementary’s Pantheon desktops and should work fine on Cinnamon.
example:
// Variable Initialization, in order of appearance.
var mysql, connOptions01, connOptions02, dbm, app;
// MySQL Module
mysql = require('mysql');
// MySQL Connections
connOptions01 = {
host: "127.0.0.1",
user: "test",
password: "qwerty",
database: "test",
dateStrings: true,
// trace: true,
// debug: true
};
connOptions02 = {
host: "127.0.0.1",
user: "test",
password: "qwerty",
database: "test",
dateStrings: true,
// trace: true,
// debug: true
};
dbm = {};
function handleMysqlDisconnect01() {
clearInterval(dbm.interval);
dbm.dbc01 = false;
dbm.dbm01 = mysql.createConnection(connOptions01);
try {
dbm.dbm01.connect(function(err) {
if(err) {
console.log('error: ' + err.stack);
setTimeout(handleMysqlDisconnect01, 2000);
return;
}
console.log('app mysql connection id:' + dbm.dbm01.threadId);
dbm.dbc01 = true;
});
dbm.dbm01.on('error', function(err) {
console.log('error stack: ' + err.stack);
console.log('error code: ' + err.code);
if(err.code === 'PROTOCOL_CONNECTION_LOST') {
handleMysqlDisconnect01();
} else {
throw err;
}
});
} catch (ex) {
console.log(ex);
}
}
function handleMysqlDisconnect02() {
clearInterval(dbm.interval);
dbm.dbc02 = false;
dbm.dbm02 = mysql.createConnection(connOptions02);
try {
dbm.dbm02.connect(function(err) {
if(err) {
console.log('error: ' + err.stack);
setTimeout(handleMysqlDisconnect02, 2000);
return;
}
console.log('app mysql connection id:' + dbm.dbm02.threadId);
dbm.dbc02 = true;
});
dbm.dbm02.on('error', function(err) {
console.log('error stack: ' + err.stack);
console.log('error code: ' + err.code);
if(err.code === 'PROTOCOL_CONNECTION_LOST') {
handleMysqlDisconnect02();
} else {
throw err;
}
});
} catch (ex) {
console.log(ex);
}
}
dbm.getMysqlConnection = function() {
return {
dbm01:dbm.dbm01,
dbm02:dbm.dbm02
};
};
dbm.setapp = function(theapp) {
app = theapp;
// MySQL initialize connections
handleMysqlDisconnect01();
handleMysqlDisconnect02();
};
module.exports = dbm;
use dbm.getMysqlConnection()
to get access to the connection handler!
We need this package redis-dump
then:
# export
$ redis-dump > dump.txt
$ redis-dump --json > mydb.json
# import
$ cat dump.txt | redis-cli
$ cat mydb.json | redis-dump --convert | redis-cli
!!! for best result always import raw commands
# convert form json
cat mydb.json | redis-dump --convert > mydb.txt
# import
cat mydb.txt | redis-cli
mysqldump is an effective tool to backup MySQL database. It creates a *.sql file with DROP
table, CREATE
table and INSERT
into sql-statements of the source database. To restore the database, execute the *.sql file on destination database. For MyISAM, use mysqlhotcopy method that we explained earlier, as it is faster for MyISAM tables.
backup:
$ mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
restore:
$ mysql -u root -p[root_password] [database_name] < dumpfilename.sql
MySQL Database Export - Backup Methods:
tutorialspoint
gzip backup:
$ mysqldump -u root -p[root_password] [database_name] | gzip > dump.sql.gz
gzip restore:
$ zcat dump.sql.gz | mysql -u root -p[database_name]