I've been looking around and all I can find is people managing db scripts using github. So they aren't storing the databases, but a list of all commands performed on a database which is then use to sync up two separate databases.
I'm managing my MySQL database using a number of php pages. Is there some way that I can actually store a real database on github along with my website, such that no matter which box I'm working from I'll be using the same database?
Why not?! You can commit the database directory to git if you want to. Programmers usually share only code on Git, not data.
Anyway, check this link http://www.mkyong.com/mysql/where-does-mysql-stored-the-data-in-my-harddisk/ to get datadir
path on your system. Go there and you can find folders for every database that exists on mySQL. Commit the necessary .frm
file to git.
You can also create a git hook which can automatically dump the database.
I use this git hook https://github.com/BlurryFlurry/switchdbwhencheckout
for switching the database when I switching branches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With