Tag Archives: command

Linux Bash Console Sql Command

Published by:

Nah maksud saya sih, bagaimana menulis perintah dalam command line linux untuk menyisipkan sebuah atau banyak data ke dalam database sql.

Begini penampakan skrip yang saya tulis sambil membaca beberapa tutorial :

!#/bin/bash
mysql -uusername -ppassword -e “USE mydatabase; INSERT INTO firsttable(id,value) VALUES(‘1′,’datasatu’);”

Dan tentunya perintah-perintah mysql lain bisa diterapkan disana, seperti UPDATE, DELETE, searching query dan sebagainya.

IP Modification Through Command Line

Published by:

Here is the way to change or modification ip address through command line. Do all the command in root privileged.

To set a static ip

#ip addr add 192.168.xxx.xxx dev eth0

to delete a static ip

#ip addr del 192.168.xxx.xxx dev eth0

to set dynamic ip

#dhclient eth0

to set route for static ip

#route add default gw xxx.xxx.xxx.xxx

to clear all ip setting

#ip addr flush dev eth0