|
|
|
|
|
March 9th, 2005, 12:57 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
OT: MySQL Databases
If I have the actual files that constitute a MySQL database, but no access to the actual location on which they are stored on the server, only access to software like phpMyAdmin, how would I go about setting up the old database on a new server?
|
March 9th, 2005, 04:21 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
|
|
Re: OT: MySQL Databases
I would ask Gandalf Parker about this, or even Richard. They seem to be the most knowledgable about these kind of things.
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
|
March 9th, 2005, 05:24 AM
|
|
Brigadier General
|
|
Join Date: Dec 1999
Location: Lancaster, OH 43130
Posts: 1,997
Thanks: 5
Thanked 9 Times in 8 Posts
|
|
Re: OT: MySQL Databases
Is this a table dump or just the physical data files fromt he mysql\data directory?
If it's a dump you can just put the insert and create statements in a phpmyadmin and off you go.
If it's the physical files you can TRY to ftp them to the mysql/data directory on the new box and it MIGHT work. Before I knew about mysqldump I used to transfer mysql databases that way and it has worked in the past BYMMV.
__________________
Change is inevitable, how you handle change is controllable - J. Strong
|
March 9th, 2005, 07:05 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT: MySQL Databases
It is a copy of the physical database files. EDIT: I can get access to the directory to upload them to, so that is not a problem. Is it a bad idea to do it this way? Should I manually create all of the databases via Cpanel first, then upload the files? Never worked with the actual database files.
Is there some easy way to convert them to SQL statements, without trying to get a working MySQL and web server on my own machine? Or would it be better to try to get them as an exported SQL file from my previous web host?
|
March 9th, 2005, 03:09 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: OT: MySQL Databases
Richards definetly the best choice on the SQL internals.
But I have seen alot of domain movement by CPanel. You might want to set it up in cpanel first in case there are settings appropriate to that site. Then when it creates the empty database in the right place with the right pointers, you can try overwriting it with the saved copy.
If that fails the export/import might be the next thing to try but again best to have an empty of the same name already in place.
As a last resort you could write a SQL script to access each record and "input" it into the new one. Definetly as a last resort but if the file has hundreds of records and not thousands then it wouldnt be too bad.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
March 9th, 2005, 04:23 PM
|
General
|
|
Join Date: Jul 2001
Location: Canada
Posts: 4,603
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: MySQL Databases
yea do a copy out, set up the enviroment on the new server and do a copy in.
use the admin tool from mysql or the web based admin tool to do this work.
I would recommend you do a compression first to clean up the database and then the copy out.
Do you not back up your database each week ? You should do this.
__________________
RRRRRRRRRRAAAAAGGGGGGGGGHHHHH
old avatar = http://www.shrapnelgames.com/cgi-bin...1051567998.jpg
Hey GUTB where did you go...???
He is still driving his mighty armada at 3 miles per month along the interstellar highway bypass and will be arriving shortly
|
March 9th, 2005, 04:37 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT: MySQL Databases
Yes I do a backup, but I had not made a backup yet before the old account was disabled.
|
March 9th, 2005, 10:22 PM
|
|
Major
|
|
Join Date: Aug 2000
Posts: 1,246
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: MySQL Databases
I haven't read your problem at all, but I gotta say just ditch MySQL and download something else... you can get Oracle 10g or 9i for free, I think... maybe some licensing issues I dunno.
The devs of MySQL used to think that foreign keys were not needed... !!!!!
Sorry to be a purist, but Im a hardcore dev person and stuff like that just makes me angry
__________________
When a cat is dropped, it always lands on its feet, and when toast is dropped, it always lands with the buttered side facing down. I propose to strap buttered toast to the back of a cat. The two will hover, spinning inches above the ground. With a giant buttered cat array, a high-speed monorail could easily link New York with Chicago.
|
March 10th, 2005, 12:32 AM
|
|
Brigadier General
|
|
Join Date: Dec 1999
Location: Lancaster, OH 43130
Posts: 1,997
Thanks: 5
Thanked 9 Times in 8 Posts
|
|
Re: OT: MySQL Databases
Fyron you can use the phpmyadmin in cpanel to create a sql statement dump of the database via the export feature. If you still have cpanel access to the old mysql database I would do that. Then you can recreate it via phpmyadmin on the new box.
Otherwise you can try to create a blank database and ftp the files into the mysql/data area, but it doesn't always work well.
__________________
Change is inevitable, how you handle change is controllable - J. Strong
|
March 10th, 2005, 12:39 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT: MySQL Databases
I don't have access to the old server anymore. I have requested such a dump from the host.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|