How to sync on demand between two database in the same server mysql

Yes saidassoumani that is possible. Only issue there is if you are replicating from prod to dev, and you modify data / schema in dev (the slave), it will break replication.

Your best bet is to backup your prod instance nightly (or however often you want) and restore it into the dev instance.