Harba Ario Sukha

“No Hackers, Phreaks, Crackers”

Linux Recover MySQL root password

March31

#/etc/init.d/mysql stop
#mysqld_safe –-skip-grant-tables &
#mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD(’passwd-baru’) where User=’root’;
mysql> flush privileges;
mysql> quit
#/etc/init.d/mysql stop
#/etc/init.d/mysql start
#mysq -u root -p

posted under Linux | No Comments »

Find the speed of your Ethernet card in Linux

March30

# dmesg |grep eth1
eth1: Broadcom NetXtreme II BCM5708 1000Base-T (B1) PCI-X 64-bit 133MHz found at mem ce000000, IRQ 169, node addr 00145ede381a
bnx2: eth1: using MSI
bnx2: eth1 NIC Copper Link is Up, 1000 Mbps full duplex
eth1: no IPv6 routers present

# mii-tool -v eth1
eth1: negotiated 100baseTx-FD, link ok
product info: vendor 00:08:18, model 54 rev 5
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

# ethtool eth1
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes

posted under Linux | No Comments »

Synchronize The System Clock

July11

yum install ntp

chkconfig –levels 235 ntpd on
ntpdate id.pool.ntp.org
/etc/init.d/ntpd start

Fedora9 (Sulphur) – Fix The Network

May18


ifconfig

route -nee

chkconfig --list

chkconfig NetworkManager off
chkconfig --levels 35 network on
/etc/init.d/network restart

rpm -e

March23

For anyone interested.

If the same package is installed twice(in the rpm database), and you want to remove it, type

>rpm –erase –allmatches <package>

you can even throw in –nodeps to force remove it

>rpm –erase –allmatches –nodeps <package>

Just thought that I’d share this.

posted under Linux | No Comments »

djbdns

November14

dnscachex/env/CACHESIZE
100000000

dnscachex/env/DATALIMIT
104857600

dnscachex/env/FORWARDONLY
1

dnscachex/env/IP
10.10.1.1

dnscachex/root/ip/
10 127.0.0.1

dnscachex/root/servers/\@
202.146.178.4
202.146.180.4

posted under Linux | No Comments »

MySQL

September6

Dumping
mysqldump -u root -p dbname > /home/dbname_dump.sql

Restore
mysql -u root -p dbname < /home/dbname_dump.sql

mysql> set password for root@localhost=password(’rootpasswd’);
mysql> create database dbname;
mysql> grant all on dbname.* to root;
mysql> grant all on dbname.* to root@localhost;
mysql> grant all on dbname.* to user;
mysql> grant all on dbname.* to user@localhost;
mysql> set password for user@localhost=password(’userpasswd’);

posted under Linux | No Comments »

Linux Bridge

August15

/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
TYPE=Bridge

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
BRIDGE=br0

/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
BRIDGE=br0

Linux VLAN

August15

modprobe 8021q

vconfig add bond0 110 #DC00_MIS-DC
vconfig add bond0 111 #DC01_UPT-PP
vconfig add bond0 112 #DC02_Akademik
vconfig add bond0 113 #DC03_SIPIL
vconfig add bond0 114 #DC04_MESIN
vconfig add bond0 115 #DC05_ADM
vconfig add bond0 116 #DC06_Akuntansi
vconfig add bond0 117 #DC07_Kimia
vconfig add bond0 119 #DC09_Elektro
vconfig add bond0 100 #DC100_Wireless
vconfig add bond0 101 #DC101_KPA_LT1
vconfig add bond0 120 #DC10_TPSDP
vconfig add bond0 121 #DC11_DueLike
vconfig add bond0 200 #GK5_Lib_Staff
vconfig add bond0 201 #GK5_Lib_Warnet
vconfig add bond0 122 #DC12_Keuangan
vconfig add bond0 102 #DC102_KPA_LT2
vconfig add bond0 103 #DC103_KPA_LT3
vconfig add bond0 210 #Lab_Internet

Linux Bonding

August15
« Older Entries