Jump to content

What is a MySQL database patch?


paddy_fields

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.