Go Back   vb.org Archive > Community Central > Community Lounge
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-23-2003, 05:13 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Moving servers, yes, but what about...

...the contents of the messages itself?

I'm following vb's.com guide to move DB from server1 to server2, but WHAT happens with all the URLs used throrough the site and inside the posts itself pointing to server1? Is there any search'n'replace thing for mysql or something like this?!?

Thanks!
Reply With Quote
  #2  
Old 01-23-2003, 05:19 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mean? URL's embedded inside the templates? You can do a search of the templates and replace the old url with a new one, if that's what you are referring to (for those 'hard-coded' in links).

Inside the posts - I believe they all stay the same unless you go in and manually edit them before transport. One suggestion (and this might be tedius and not worth it, but it's a shot) is to open your .sql file of the database into an editor ((such as EditPlus 2.0)) and use their search and replace feature to try that before you upload the actual database contents.

Good luck with it, though.
Reply With Quote
  #3  
Old 01-23-2003, 05:26 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought there would be a mysql function to do the search'n'replace....

Since I'm referring to URLs containing an old path (domain1.com/mysite/forums/blablabla.php to domain2.com/forums/blablabla.php), I guess there must be an easy cure for this!

Pleez?
Reply With Quote
  #4  
Old 01-23-2003, 05:37 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do so at your own risk:
[sql]
UPDATE post SET pagetext = REPLACE(pagetext, 'http://olddomain', 'http://newdomain');
[/sql]
Be sure to include the http://.
Reply With Quote
  #5  
Old 01-23-2003, 05:41 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it SO risky? Seems more reliable than other methods
Reply With Quote
  #6  
Old 01-23-2003, 05:45 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Meanwhile, on STEP 3 of VB's.com mOVING SERVERS MANUAL, I'm now trying to import the dump onto the new server but I get this:

ERROR 2006 at line 157: MySQL server has gone away

What am I doing wrong?!?!
Reply With Quote
  #7  
Old 01-23-2003, 05:51 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by filburt1
Do so at your own risk:
[sql]
UPDATE post SET pagetext = REPLACE(pagetext, 'http://olddomain', 'http://newdomain');
[/sql]
Be sure to include the http://.
BAHHH figures (:
Reply With Quote
  #8  
Old 01-23-2003, 09:35 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Re: I say so at your own risk because it's an UPDATE query and that modifies your data, unlike harmless SELECT.
Reply With Quote
  #9  
Old 01-24-2003, 08:05 AM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HoweverI'm still stucked on IMPORTING the dump I made...

I get the error mentioned above.

I followed every instruction on Vb.com moving servers guide, BUT I could not use the --opt parameter, instead I used the ones opt mean sepparately EXCEPT FOR lock-tables.

Now each time i try to recreate the database,

ERROR 2006 at line 157: MySQL server has gone away

appears.

Advice pleasE!!
Reply With Quote
  #10  
Old 01-24-2003, 02:08 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it's your host's fault for misconfiguring something in my.cnf, try asking them.
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04118 seconds
  • Memory Usage 2,245KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete