How to roll back mysql 5.6 to sql 5.1
Few things to keep in mind first, you're not using features from 5.6, that are not available in 5.1 like  utf8mb4 encoding (needed for emoji characters)

Take dump of all databases using mysqldump except mysql, is safer to recreate mysql.user table.

Try restoring on staging server first, to see if restored db works the way as you expect.