Current location: Hot Scripts Forums » Programming Languages » PHP » Query Dump for blob field type


Query Dump for blob field type

Reply
  #1 (permalink)  
Old 06-16-03, 11:37 PM
ridwank's Avatar
ridwank ridwank is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Indonesia
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Question Query Dump for blob field type

For example:

I have a table, which one field type set to BlobImage.
The table already contains a lot of records.

The problem is:

when i created a dump query, to get the INSERT statement,
it's making a very large textfile, especially in the blob field.
(yes, the blob field contain an ASCII characters)

Then, when I want to restore that query into the other database.
PhpMyAdmin could not hold that large text file to execute the query, (maybe because of the not enough memory)

then i try to dump just one rows INSERT statement, to get a smaller size of dump text, ... and its works.
but when i browse / display that image on the web, it's give me an error image.

the QUESTION :

Is there any other way to move table, beside a QueryDump ?
But not "file transfering", because
Offcourse I don't have SSH / telnet access
to copy my table files into the mysql data folder.
the Host Company will kill me if it does

any answer ??? please reply
__________________
-=ridwank=-

<b><a style='text-decoration:none' href="http://www.ridwank.com">CLICK : ridwank.com : PHP SCRIPT CENTER</a></b>

Last edited by ridwank; 06-16-03 at 11:41 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-17-03, 05:31 AM
nd2 nd2 is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
you could try a raw mysql table dump, some scripts use this method, if not there is a bit about it in the mysql manual about dumping the database.

where are you moving the table to ? the same host?

in the program you are using click operations and you can move the table faily easily and it should work on the blob.

however that will only work if it's on the same server.
__________________
IonCMS (Coming Soon.)
http://ioncms.com
--
Ncaster (Free php/mysql cms)
http://ncaster.cjb.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-17-03, 06:00 AM
ridwank's Avatar
ridwank ridwank is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Indonesia
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
my table is in different host :(

Hi nd2,
thx for your response.

But I want to move the table into different host

and yes, there's "MOVE" feature in "OPERATION" page.
(it could be found in newest version of phpMyAdmin).
and offcourse it'll only work if the table is in the same server.

and I hope...in the next version of phpMyAdmin
there will be a feature to SAVE and UPLOAD table
as 3 (three) those table data file,
such as: mytable.frm; mytable.MYD; mytable.MYI

Then for now, I just have to insert the table contents
all over again

anyway... thx for the reply...
__________________
-=ridwank=-

<b><a style='text-decoration:none' href="http://www.ridwank.com">CLICK : ridwank.com : PHP SCRIPT CENTER</a></b>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 06-19-03, 12:51 AM
nd2 nd2 is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
np.
__________________
IonCMS (Coming Soon.)
http://ioncms.com
--
Ncaster (Free php/mysql cms)
http://ncaster.cjb.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 06-20-03, 12:35 PM
gizmoitus's Avatar
gizmoitus gizmoitus is offline
Niamh's Daddy
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
If you can't export and input one row sucessfully, then your problem with trying to export/import a large data set seems besides the point.

Any ways, your problem with a large query can only be fixed to my knowledge by adding a new setting to the mysql my.cnf file, which would have to be done by your hosting company.

The setting is: set-variable=max_allowed_packet=15m


In this example, I've increased the max_allowed_packet to be 15 megabytes in size. This would need to be roughly the size of whatever your insert statement from your export is.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a query that makes a field a link to the entire row mdhall PHP 8 10-09-03 07:18 PM


All times are GMT -5. The time now is 12:56 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.