Git deployment using post-receive hook
Let’s assume you have configured your brand new git repository on a brand new server and now you want to setup it in a way that every push done on a master branch update your production directory. How can you achieve that?
You can use git hooks feature. In hooks/ directory in your git repo you can find a file called post-receive, take a look at quick example below:
{% codeblock lang:bash %} #!
Git deployment using post-receive hookHow to deal with MySQL Error 2013
Some time ago I was having problem with my script that backups all the databases on the server - one day it just began to produce empty sql files. When I ran script manually I saw unpleasant: Error 2013: Lost connection to MySQL server while dumping one of the tables - hence empty backups.
First I tried to check table, repair it and optimize it, but with no luck. So I took a look at syslog (I guess should have done that first) and saw to my surprise: InnoDB: Database page corruption on disk (…) I will spare you the googling and give you solution that might help you too.
How to deal with MySQL Error 2013