Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExpressionEngine : git : local development : remote database

To those of you that are trying to be good little developers and version control their ExpressionEngine sites with git, how do you handle your database?

In my limited experience with multiple developers working on one ExpressionEngine site, we've had to all run off of a single MySQL development database running on a remote web server. For those of you that have tried this, it is PAINFULLY slow. Page loads can easily take 5-10 seconds making development extremely difficult. It would be quicker to work off of a remote development server. I am trying to steer away from working off of a remote MySQL server in order to be able to work from anywhere and not depend on Internet connection speed/quality.

Just wondering how others handle their MySQL databases.

Do all of your developers run off of one central database? Have you dealt with slowness issues like we have?

Do you keep your database under version control? How do you handle export/imports among multiple developers and multiple branches?

With one developer I can import/export/commit the database very easily but as soon as you add another developer to the mix, it gets very VERY muddy. Looking forward to hearing everyone's thoughts on this mammoth topic.

Thanks!

like image 860
Jacob Graf Avatar asked Nov 07 '12 14:11

Jacob Graf


2 Answers

It seems there is a lot of time lost on failing DNS requests, with a remote database.

Start your MySQL server with start mysqld with --skip-name-resolve. (More information on this topic can be found here: http://dev.mysql.com/doc/refman/5.0/en/host-cache.html)

Having a remote database still seems to be the best way for us to work on a project with multiple developers.

like image 118
Filipvds Avatar answered Oct 20 '22 01:10

Filipvds


I almost always use a central database for development. Depending which host you use, the speed difference may not be huge.

Obviously, if you're not making changes to the database, i.e. only doing template development, keeping the database in sync is not as needed, so you could potentially bring up a local copy of the database. You just have to remember to repeat any database changes, if you do end up making some.

As far as version control, I keep a copy of my base EE install's SQL file in my base repository. Other than that I don't usually keep copies of the database in Git, so I don't do a lot of importing/exporting, etc.

like image 43
Jeremy Gimbel Avatar answered Oct 19 '22 23:10

Jeremy Gimbel