Here is my journal, I'm just to use this as journal of my work, to keep remember what i found in doing my day to day work. So i'm not really mean to make a nice blog, but hope this may help some people too.

Thursday, October 16, 2008

Force send queue mail in qmail (used in smeserver)

I'm just need to force the qmail that used in smeserver to process all the queue email.
This is usefull when you have internet connection problem or any problem that make the mail server pending all outgoing mail. After there is ix to the problem, you need to force send all the pending mail

cd /var/qmail/bin
./qmail-qstat
./qmail-qread
./qmail-tcpok
ps axl|grep qmail-send
kill -s ALRM nnn

replace the nnn with value you see on ps axl command

Friday, October 10, 2008

Importing CSV to mysql

I'm just trying to import csv file to mysql table database. 
Here is the command:

load data local infile 'csv file
into table target table 
fields terminated by ','
ignore 1 lines;

The basic command to import data is "load data"
To read your file you can use the "local infile 'your.csv'"
Then you need to specify what delimeter of each file in your file by "fields terminated by ','"
To ignore header field, use "ignore 1 lines"