Firstly, if ufw firewall is enabled, ensure you have a rule for MySQL sudo ufw allow mysql
Restart the service
sudo service ufw restart
// First method | |
navigator.storage.estimate().then((data)=>console.log(data)) | |
// OR second method | |
navigator.webkitTemporaryStorage.queryUsageAndQuota ( | |
function(usedBytes, grantedBytes) { | |
console.log('we are using ', usedBytes, ' of ', grantedBytes, 'bytes'); | |
}, | |
function(e) { | |
console.log('Error', e); |
# Before, install mod proxy and proxy_http | |
# a2enmod proxy proxy_http | |
<VirtualHost *:80> | |
ServerName sub.yourdomain.com | |
ProxyPreserveHost On | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
# Redirect/forward subdomain to local port |
#! /bin/bash | |
# Buat user 'USERDB' dengan privileges : | |
# SELECT, RELOAD, SHOW DATABASES, LOCK TABLES, TRIGGER, SHOW VIEW | |
NOW=$(date +"%F_%H%M%S") | |
BACKUP_DIR="/data/backup/databases" | |
BACKUP_LOG="$BACKUP_DIR/backup.log" | |
MYSQL_USER="USERDB" | |
MYSQL_PSWD="YOUR_PASSWORD" | |
MYSQL=/usr/bin/mysql |
-- First method | |
SELECT * FROM t1 | |
LEFT JOIN t2 ON t1.id = t2.id | |
UNION | |
SELECT * FROM t1 | |
RIGHT JOIN t2 ON t1.id = t2.id | |
-- Second Method | |
-- The query above works for special cases where a FULL OUTER JOIN operation would not produce any duplicate rows. | |
-- The query above depends on the UNION set operator to remove duplicate rows introduced by the query pattern. |
-- Edit dulu file my.cnf ( biasanya di sini /etc/my.cnf ) | |
-- [mysqld] | |
-- # bind sesuai dengan IP yg diijinkan 0.0.0.0 = allow all IP4 | |
-- bind-address=0.0.0.0 | |
-- # Disabling symbolic-links is recommended to prevent assorted security risks | |
-- symbolic-links=0 | |
-- port=3306 | |
-- Kemudian restart mysql: sudo systemctl restart mysql | |
-- Login ke mysql melalui terminal (ssh): mysql -uroot -p |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Your App Tittle</title> | |
</head> | |
<body> | |
<iframe src="https://yourapp.com/appdir" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"> | |
Browser anda tidak mendukung iframe. | |
</iframe> | |
</body> |
// Doc Async : https://caolan.github.io/async/v3/index.html | |
// Download : http://www.jsdelivr.com/projects/async | |
function task(item, callback) { | |
setTimeout(function() { | |
console.info(item + ' selesai'); | |
// null menandakan fungsi berhasil | |
callback(null, item * 3); | |
// jika gagal atau error, return dengan selain null | |
// misal : callback('error','keterangan error'); |
SET @saldo = 3000000; | |
SELECT id_sample, uraian, debet, kredit, (@saldo := @saldo + (debet - kredit)) as Saldo | |
FROM sample; | |
-- Alternatif as one query statements | |
SELECT s.id_sample, s.uraian, s.debet, s.kredit, (@saldo := @saldo + (s.debet - s.kredit)) as Saldo | |
FROM (SELECT @saldo := 3000000) AS dummy | |
CROSS JOIN sample s; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |