Author Archives: ballacksave

dump only sp trigger vs row data only

SP and Triggers only : time mysqldump -uroot -ppass –routines –no-create-info –no-data –no-create-db –skip-opt dbndm2 > dbndm2-sp-and-trigger-only_2021-09-10.sql Row data only :time mysqldump -uroot -ppass –skip-triggers dbndm2 > dbndm2-data-without-sp-and-trigger_2021-09-10.sql

add ssh key to ubuntu server

ssh-keygen scp /home/system/.ssh/id_rsa_box_contoh user@servertujuan:/home/system di server tujuan :cat /home/system/.ssh/id_rsa_box_contoh > /home/system/.ssh/authorized_keys

ip tx rx traffic ubuntu

ip -s -h link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 RX: bytes packets errors dropped overrun mcast 251k 1.82k 0 0 0 0 TX: bytes packets errors dropped carrier collsns 251k 1.82k 0 0 0 0 2: ens32: mtu 1500 qdisc noop state… Read More »

MySql 8 mysql_secure_installation

sudo mysql_secure_installationpasswordnya : mautauajaRemove anonymous users? (Press y|Y for Yes, any other key for No) : yDisallow root login remotely? (Press y|Y for Yes, any other key for No) : yRemove test database and access to it? (Press y|Y for Yes, any other key for No) : yReload privilege tables now? (Press y|Y for Yes,… Read More »

mysqldump gz from another server

dari computer local ssh ke server database, untuk didump ke local komputer kita : ssh system@ip-server-mysql-yg-mau-di-dump “mysqldump -uroot -ppasswordnya dbname | gzip -9” > file-local-dbname.sql.gz

gzip file

Compress :gzip nama-fileakan terbuat nama-file.gz, file yg asli terdelete, gunakan -k jika ingin file yg lama tetap ada Compress setiap file didalam folder : gzip -r foldername Decompress :gunzip nama-file.gzorgzip -dk nama-file.gz

running app as service ubuntu

sudo vi /etc/systemd/system/coba.service [Unit] Description=aplikasi coba [Service] User=system WorkingDirectory=/home/system/coba ExecStart=/home/system/coba/coba.sh Restart=always [Install] WantedBy=multi-user.target Reload the service files to include the new service.sudo systemctl daemon-reload Start your servicesudo service coba start To check the status of your servicesudo service coba status To enable your service on every rebootsudo systemctl enable coba To disable your service on… Read More »

Clear ubuntu swap memory

sudo swapoff -asudo swapon -a Check swappiness : cat /proc/sys/vm/swappiness(default ubuntu 60) Change swappiness : temporary : sudo sysctl vm.swappiness=10 permanent : sudo vi /etc/sysctl.confadd/change linevm.swappiness=10