473,325 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

How do I move a database with binary content ?

I have moved to a more recent operating system. The staff of the hosting company did the move. They took an exact copy of the database and moved it.
Problem: the binary blob-fields used to store images, can no longer be read as photo-files => photos are in correct proportions, but are a no-show (rectangle - in the right proportions - with red cross on the upper left corner).
Jun 23 '07 #1
4 1237
Atli
5,058 Expert 4TB
Hi, and welcome to TSDN!

As far as I know, using "SELECT * INTO OUTFILE" and "LOAD DATA INFILE" should backup your data and restore it correctly.

You could try this, just to see if it works. DO NOT however try this on data you don't want to lose untill you have tested it!
Expand|Select|Wrap|Line Numbers
  1. /* Create backup */
  2. SELECT * INTO OUTFILE 'backup.txt' FROM myTbl;
  3.  
  4. /* Truncate test table */
  5. TRUNCATE myTbl;
  6.  
  7. /* Restore data */
  8. LOAD DATA INFILE 'backup.txt';
  9.  
  10.  
Jun 23 '07 #2
Thank you for your reply, I will test this and let you know if it helped me.
Jun 23 '07 #3
I get the error message in php that there is a "syntax error, unexpected T_STRING in /home/.../bedrijf_test.php" on line 15
SELECT * INTO OUTFILE 'backup.txt' FROM foto_copie;
Jun 25 '07 #4
errormessage that access is denied for my username.
Is this way only preserved for the root ?
Jun 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dux | last post by:
I have used some example code to create a database in MySQL and using php I can add binary files to the database. I was under the impression that I would be able to download the files with the...
4
by: projecktzero | last post by:
Well, I've managed to get an image into a postgre database, but now I'm having trouble getting it out. #! /usr/bin/env python from pyPgSQL import PgSQL def main(): connectdb =...
2
by: Frostillicus | last post by:
I'm trying to get an ASP to return a zip file to the remote browser from an Image (BLOB) field in SQL Server 2000 but Internet Explorer keeps saying: Cannot open C:\Documents and...
7
by: doug.hughes | last post by:
Hi I wrote an email queuing application in ASP / CDO, which uses a database as it's source. It reads email parameters (From, To, Subject, etc.) from a database, constructs then sends mail...
2
by: Denis Crotty | last post by:
Hi I am dealing with an existing application that has a large set of static data in a SQL database. It is actually a set of code that has been ported into different languages and into different...
5
by: Neo | last post by:
Hello: I am receiving a Binary File in a Request from a application. The stream which comes to me has the boundary (Something like "---------------------------39<WBR>­0C0F3E0099" without the...
14
by: rolfejr | last post by:
I am trying to display a PDF in the users browser that is pulled from a binary field in our database, and keep that PDF from caching on the client computer. I can successfully pull the PDF and...
10
by: eholz1 | last post by:
Hello Members, I am setting up a photo website. I have decided to use PHP and MySQL. I can load jpeg files into the table (medium blob, or even longtext) and get the image(s) to display without...
14
by: Mikee Freedom | last post by:
Good Morning all, New member to the list, hoping you might be able to give me some much needed advice. Basically, I have a client who would like to offer the ability for his users to have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.