![]() |
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! |
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. |
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? |
Do so at your own risk:
[sql] UPDATE post SET pagetext = REPLACE(pagetext, 'http://olddomain', 'http://newdomain'); [/sql] Be sure to include the http://. |
Is it SO risky? ;) Seems more reliable than other methods ;)
|
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?!?! |
Quote:
|
Re: I say so at your own risk because it's an UPDATE query and that modifies your data, unlike harmless SELECT.
|
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!! |
I think it's your host's fault for misconfiguring something in my.cnf, try asking them.
|
Can't I just copy the whole mysql/var directory containing all of the DBs I want to the new server via FXP???
What's the problem with that?!? Please advice asap! Thanks. |
Those files never contain the entire database. MySQL caches a lot, that's why the only complete way of backing up your forum is via MySQL's own functions like mysqldump or through phpMyAdmin and alike.
|
But i can see all of the info! Database is current, i can see the latest user on both servers, the latest post on both, etc...
How can I use phpmyadmin to achieve the dump? I couldn't recover the dump from the command line at all... |
If you are sure that every info is in the new DB, just upload the files to the server, edit config.php according to the new host and try to run vB.
|
FWIW you must use SSH/Telnet to restore a dump. Any PHP-based method including PMA and the admin CP are horrendeously unreliable.
|
I tried Telnet.
I do get ERROR 2006 at line 157: MySQL server has gone away when I try to restore the dump. I'm unable to use the --opt parameter due to another error. Can I just back it up without --opt? After copying using the mysql/var transfer from one server to another, i get these other errors: https://vborg.vbsupport.ru/showthrea...threadid=48229 |
Quote:
|
All times are GMT. The time now is 02:07 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|