I always worked on my projects with GIT and major frameworks can do the migrations through the code, so the problem of database dependency is solved.
But here in Magento2 I don't know if I'm going on the good way.
I configured all the stuff that only is saved on database like stores configuration, locate, etc. So I did a mysqldump.
Then for testing, I created a production environment and I uploaded the code, installed magento and restored this mysqldump.
I figured out I had to change the base_url: on the table
core_config_data the line 2
And that's all I changed for now, but I think I'm missing something. For example when I enter to admin panel, it disconnects me from another page like is the same user, but they are on different pages.