Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
to export my mysql what all options do I need turned on??? also there are the ubbt_ files and w3t files, I think I only need the ubbt_ correct?
Attachments
Joined: Jun 2006
Posts: 3,839
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Jun 2006
Posts: 3,839
Likes: 1
You are better doing this from the command line. MySQL Export: mysqldump -uuser -ppass database_name > dump_name.sql MySQL Import: mysql -h localhost -uuser -ppass database_name < dump_name.sql
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
that is right .... I remember you saying that before.. I use a mac... not sure what to put that command line...
Joined: Jun 2006
Posts: 3,839
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Jun 2006
Posts: 3,839
Likes: 1
You need to run something like putty or another ssh terminal software application. I do not use a mac, so am afraid I cannot comment upon what may work. You need to ensure though that you have ssh connection to your site.
Joined: Jun 2006
Posts: 9,242
Likes: 1
Former Developer
Former Developer
Joined: Jun 2006
Posts: 9,242
Likes: 1
The w3t_ ones are for the old forum so you won't need those. As Ian noted, you'll need ssh access to your site to do the command line dump. If you do have ssh access then you can just use the terminal in the mac to ssh to your site.
Joined: Jun 2006
Posts: 3,839
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Jun 2006
Posts: 3,839
Likes: 1
Thanks Ric - wasn't sure about the Mac.
Joined: Jun 2006
Posts: 9,242
Likes: 1
Former Developer
Former Developer
Joined: Jun 2006
Posts: 9,242
Likes: 1
It's been awhile since I've been on a Mac, but since I spend 90% of my day in some sort of SSH client, when I did have one it was the first thing I looked for
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
ok I downloaded a program called fugu I then put in this command MySQL Export: mysqldump -dbo122662337 -XXXXXXXX db122662337 > dump_name.sql XXXXXXX is my password I tried it without the "MySQL Export:" and with it... it rejected it... suspect there is a - missing? Really appreciate the help from both of you..
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
You need
-u USERNAME
-p PASSWORD (keep the u and p in there)
As for fugu, never used it -- but I like the name
GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 9,242
Likes: 1
Former Developer
Former Developer
Joined: Jun 2006
Posts: 9,242
Likes: 1
You don't need the MySQL Export: portion. You only need: mysqldump -dbo122662337 -XXXXXXXX db122662337 > dump_name.sql
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
I didn't even notice that part. But doesn't he also need the -u and -p ? (Just going by another thread's instructions)
GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
hmmm what does mysqldump: unknown option '-b' mean? Am not using putty on a windows machine
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
I'm guessing that you left out the u and p in username and password? Try this: mysqldump -udbo122662337 -pXXXXXXXX db122662337 > dump_name.sql (you can change dump_name to something memorable)
GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
ok that was quick, but it was only 1.2 megs, does that seem right????
Joined: Jun 2006
Posts: 684
Addict
Addict
Joined: Jun 2006
Posts: 684
Yes. It's a little over 1,100 files.
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
there should be about 100,000 + messages... That was sooo fast...
Joined: Jun 2006
Posts: 3,839
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Jun 2006
Posts: 3,839
Likes: 1
sorry to confuse on the earlier command lines
Joined: Jun 2006
Posts: 684
Addict
Addict
Joined: Jun 2006
Posts: 684
there should be about 100,000 + messages... That was sooo fast...
No. That shouldn't be right. I thought you meant the Threads download here. Sorry about the confusion.
Joined: Jun 2006
Posts: 16,367
Likes: 126
Joined: Jun 2006
Posts: 16,367
Likes: 126
Glad to see my crafted query being used hehe...
Joined: Jun 2006
Posts: 16,367
Likes: 126
Joined: Jun 2006
Posts: 16,367
Likes: 126
Also, the query should execute quite fast; and if you where to tar or globalzip the archive it'd compress it down quite a bit as well. Keep in mind that all data is just text, so it won't be gigantic...
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
If you're on a mac it comes with terminal. works fine. ssh to the server with the database, unless of course you are local to it. mysqldump --opt -u root -p database > dumpfile.sql Yes, opt is on by default on newer versions of MySQL but not on older versions. I use it anyway, just in case. Saves a lot of time later.
Joined: Jun 2006
Posts: 16,367
Likes: 126
Joined: Jun 2006
Posts: 16,367
Likes: 126
cli goes so much faster than using scripts
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
I so appreciate this community, without it I would be in huge trouble I was able to dump the mysql, using putty (using a **gasp** windows machine, please do not tell my mac friends /:) Before I inpmort the file - - Where to a put the file? WIll be using plesk 8 and the OS is Fedora
Joined: Jun 2006
Posts: 16,367
Likes: 126
Joined: Jun 2006
Posts: 16,367
Likes: 126
You can place the file on the server anywhere you have access to write to; including your ftp root; simply login to ssh and navigate there and execute the import command.
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
It looks like I have imported the mysql But it gives a message about not creating not creating new database, this was not on the old one is this normal?
Attachments
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
I installed a new 7.1 beta on the new server, the same one I am using on the old one...
Did the install as a new install BUT used the existing, recently imported DB
Screen is coming up blank ie
http://clubadventist.org/forum/ubbthreads.php Feeling like this is coming close to working...
Appreciate this community so much..
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
I am using clubadventist.org rather than clubadventist.org on the new server, this will be temp,,,, HOWever is there something in the imported DB that I need to adjust for this?
Joined: Jun 2006
Posts: 9,242
Likes: 1
Former Developer
Former Developer
Joined: Jun 2006
Posts: 9,242
Likes: 1
If you have a changed url, then you'll need to edit the config file in the includes directory. You'll see where it has the old URL listed in a couple locations, where you'll need to change it.
Joined: Jun 2006
Posts: 869
old hand
old hand
Joined: Jun 2006
Posts: 869
OK will do that, (even if i did a clean install?) Thanks
Joined: Jun 2006
Posts: 16,367
Likes: 126
Joined: Jun 2006
Posts: 16,367
Likes: 126
BTW, most webhosts will give you a control panel along with phpmyadmin, the control panel is where you'll need to create new databases. Also, using PHPMyAdmin to import a large backup, you'll likely lag out, you should use command line tools. As for the blank screen, edit includes/config.inc.php and update all paths and url's.
Joined: Aug 2004
Posts: 469
Addict
Addict
Joined: Aug 2004
Posts: 469
mysqldump --opt -u root -p database > dumpfile.sql Yes, opt is on by default on newer versions of MySQL but not on older versions. I use it anyway, just in case. Saves a lot of time later.
I'm really glad I read this as my old server is running a pre-historic version of MySQL that was commonly used around the time when the Egyptians (or was it Marsians?) build the great pyramids.
What does --opt do btw, and how does it save time later?
Joined: Jun 2006
Posts: 16,367
Likes: 126
Joined: Jun 2006
Posts: 16,367
Likes: 126
BTW, --opt is enabled by default as of MySQL 4.1 (according to the man page):
As of MySQL 4.1, --opt is enabled by default, but can be disabled with --skip-opt.
As for what it does, quoting the manual again:
· --opt This option is shorthand; it is the same as specifying --add-drop-table --add-locks --create-options --disable-keys --extended-insert --lock-tables --quick --set-charset. It should give you a fast dump operation and produce a dump file that can be reloaded into a MySQL server quickly. As of MySQL 4.1, --opt is on by default, but can be disabled with --skip-opt. To disable only certain of the options enabled by --opt, use their --skip forms; for example, --skip-add-drop-table or --skip-quick.
Joined: Aug 2004
Posts: 469
Addict
Addict
Joined: Aug 2004
Posts: 469
I guess I'm very lucky that Dave mentioned this as my old server is running 4.0.22. All this time I have been making mysql dumps without this, but luckily never had to reimport them back.
2 members (Ruben , SenecaFlyer ),
929
guests, and
67
robots.
Key:
Admin ,
Global Mod ,
Mod