If by “attaching” you mean to import and use a database on a site then no, this can’t be done with FTP. You could write a server side script (probably PHP) to do that (phpMyAdmin is one such) or use any database management software. You do need the database hostname and login info, though. But if you only have FTP access then I guess you’re screwed.
Donít click this link!