You can copy your web files (HTML, PHP, ...) to your new server, but if these files make use of abolute file paths then you must change the paths.
Regarding CGI, this depends on the configuration of the old server.
You can make SQL dumps of your MySQL databases and import them into your new MySQL database:
http://www.howtoforge.com/faq/6_3_en.html
http://www.howtoforge.com/faq/6_4_en.html