Jump to content


What is a MySQL database patch?

  • Please log in to reply
2 replies to this topic

#1 paddy_fields


    Advanced Member

  • Members
  • PipPipPip
  • 178 posts
  • LocationBrighton

Posted 10 June 2014 - 04:49 AM

I know this is a very simple and probably stupid question - but what is a patch? i've tried searching online for an explanation but I just find articles on the 'best practice' and it doesn't break it down into what it actually is!


I've just been looking into new hosting and they offer a managed service, which includes database patching.


Could someone please enlighten me?

Edited by paddyfields, 10 June 2014 - 04:49 AM.

#2 trq


    Advanced Member

  • Administrators
  • 31,036 posts
  • LocationSydney, Australia.

Posted 10 June 2014 - 06:41 PM

Put simply a patch is just a file of changes that can be applied over the top of an existing file.

An example:

Given a file named foo.txt containing...

Hello World
And a patch file named foo.patch containing...

diff --git a/foo.txt b/foo.txt
index 557db03..3ef92e9 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1 +1 @@
-Hello World
+Hello World, my name is trq.
Applying this patch using...

patch -p1 < foo.patch
Would result in foo.txt containing....

Hello World, my name is trq.
Patches are often used to apply changes to source code.

What I assume your host is talking about is that they will patch your database with the latest security fixes.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.

#3 paddy_fields


    Advanced Member

  • Members
  • PipPipPip
  • 178 posts
  • LocationBrighton

Posted 11 June 2014 - 03:57 AM

Thank you for the explanation, I'll look into the diff method of patches it seems quite interesting!


I think you may be right about what the hosting company was referring to - I'll call them to clarify.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime