.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   OT: MySQL Databases (http://forum.shrapnelgames.com/showthread.php?t=23045)

Fyron March 9th, 2005 12:57 AM

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?

Atrocities March 9th, 2005 04:21 AM

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.

Richard March 9th, 2005 05:24 AM

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.

Fyron March 9th, 2005 07:05 AM

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?

Gandalf Parker March 9th, 2005 03:09 PM

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.

tesco samoa March 9th, 2005 04:23 PM

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.

Fyron March 9th, 2005 04:37 PM

Re: OT: MySQL Databases
 
Yes I do a backup, but I had not made a backup yet before the old account was disabled.

Instar March 9th, 2005 10:22 PM

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

Richard March 10th, 2005 12:32 AM

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.

Fyron March 10th, 2005 12:39 AM

Re: OT: MySQL Databases
 
I don't have access to the old server anymore. I have requested such a dump from the host.


All times are GMT -4. The time now is 07:38 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.