in reply to how to connect to a mySql database

but since the mysql is on a server do i need the install DBD-mysql ?

Yes. The DBD::mysql module is needed on any host that wants to connect to a mysql server through DBI.