I have asterisk 1.4 running on cent os and I want to get all my call logging to go to a myqsl database. Can this be done and where do I start?

Check this

use asterisk realtime, you need to log your cdr in mysql db so consult cdr_mysql.conf and make the appropiate connection with your db.