add write_db interface...
add mysql function...