If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > using a select in mysqldump

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-04, 11:57
milerosu milerosu is offline
Registered User
 
Join Date: Nov 2004
Location: timisoara, romania
Posts: 2
using a select in mysqldump

Hello!
I need some advice please.

I have to extract a light version of a quite big database, which has to be used for development.
I have to change-replace fields like email, physical address with dummy values.
The second thing is to change the records with files (blobs) to have a dummy doc inside instead of the original one.

I do not have too much space left on the db machine, so i was thinking about extracting the contents of the db in text format. I studied mysqldump options, but none seems to allow somehow the use of a select in it.

Thank you very much.
Reply With Quote
  #2 (permalink)  
Old 12-17-04, 03:53
codenode codenode is offline
Registered User
 
Join Date: Dec 2004
Posts: 26
Maybe you could use INSERT INTO temp_table SELECT ... (http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html) then REPLACE the data in temp_table then SELECT INTO OUTFILE (http://dev.mysql.com/doc/mysql/en/SELECT.html) from the temp_table out to a file. Then development can easily LOAD DATA INFILE that file.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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