Category Archives: Linux

Open network access for mysql on ubuntu server

Error message came out when I try to access new vps server :

$ mysql -ubox-p -h

Enter password:
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘’ (61)

Edit file :

# nano /etc/mysql/my.cnf

find this line :

bind-address           =

add # in the front into

#bind-address           =

save and restart mysql.

Re try again :

$ mysql -ubox -p -h

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 50
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.


How to change proxy information on ubuntu server

New motherboard has come and I ask my friend to install Ubuntu Hardy . Everything is fine except proxy section when I try to apt-get update.

# apt-get update

Err hardy-security Release.gpg
Could not resolve ‘;3128’
Err hardy-security/main Translation-en_US
Could not resolve ‘;3128’
Err hardy-security/restricted Translation-en_US
Could not resolve ‘;3128’
Err hardy-security/universe Translation-en_US
Could not resolve ‘;3128’

As you see proxy information is incorrect, there is a ; sign not :

Continue reading

How to change timezone on ubuntu

One of my friend server must get reconfigure its clock each time, specially when the server get reboot after lamp problem.

Until he realized the timezone is different.

Here’s quick way to change it :

# dpkg-reconfigure tzdata

Current default timezone: ‘Asia/Jakarta’
Local time is now:      Sat Oct  3 13:02:53 WIT 2009.
Universal Time is now:  Sat Oct  3 06:02:53 UTC 2009.


# date

Sat Oct  3 13:03:15 WIT 2009

Great, it fix.

Update Clam Anti Virus Definition Offline

Not everyone has good internet access or have problem with restriction such proxy password, port blocking etc.

That thing also happen  to our division, when we must doing regular maintenance including latest standar operating procedure that implement Clam Anti Virus in System Rescue CD we don’t have internet access due to security policy during attack of clicker worm.

That means no virus definition!

But Anti virus without latest defintion is not good, I took offline solution for update clam anti virus.

Here’ s the steps :

1. Checking clamav version :

clamd -V

ClamAV 0.94.2/8970/Tue Feb 10 02:52:04 2009

2. Clamav provide offline method, we just need to download latest version from here :


3. Download main.cvd and daily.cvd from computer that has internet access and save it to usb flash disk.

4. Run system rescue cd on computer target.

5. Put USB flash disk on computer target.

6. Run these commands :

Checking flash disk location

fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6f656f65

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1043     8377866    7  HPFS/NTFS

Disk /dev/sdb: 4043 MB, 4043309056 bytes
255 heads, 63 sectors/track, 491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x04dd5721

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         492     3948512+   b  W95 FAT32
Partition 1 has different physical/logical endings:
phys=(490, 254, 63) logical=(491, 145, 38)

Well, its located in /dev/sdb1

Mount the flash disk :

mkdir /mnt/flashdisk
mount -t vfat /dev/sdb1 /mnt/flashdisk
cp /mnt/flashdisk/daily.cvd /var/lib/clamav

Done, I use latest main.cvd so I don’t have to update it.

Run clamscan to scan as previous post.

Linux Kernel 2.6.27 is out : native support for my acer laptop wifi

Yes, huge thanks for atheros support in this kernel.

More changes in summary :

2.6.27 add a new filesystem (UBIFS) optimized for “pure” flash-based storage devices, the page-cache is now lockless, much improved Direct I/O scalability and performance, delayed allocation for ext4, multiqueue networking, an alternative hibernation implementation based on kexec/kdump, data integrity support in the block layer for devices that support it, a simple tracer called ftrace, a mmio tracer, sysprof support, extraction of all the in-kernel’s firmware to /lib/firmware, XEN support for saving/restorig VMs, improved video camera support, support for the Intel wireless 5000 series and RTL8187B network cards, a new ath9k driver for the Atheros AR5008 and AR9001 family of chipsets, more new drivers, improved support for others and many other improvements and fixes.

Full news