Basically you want to copy all the contents into the old directory into the new directory. Make sure that you do not copy binlogs either (if they exist, they look like mysql-bin.001, etc., and also do not copy mysql-bin.index, because they contain a link to the real path to the old binary logs) . After that, you can restart the mysql daemon and log in to see the databases.
PS: not tested, but should work.
source share