Welcome to Geeklog, Anonymous Saturday, April 20 2024 @ 01:34 am EDT

Geeklog Forums

retrieving data from bungled install


wfz

Anonymous
Hi, I did a couple of stupid things in the last few days and have wound up with three different GL databases. I think all of them have been upgraded to 1.3.8 by the install process at one point or another. ;-) I have a new database which is clean and two older databases which are more questionable. The good news is I can see the data in all 3 dbs using phpmyadmin and it all looks fine. I want to retrieve selected information from the older databases -- user lists and stories, basically -- and insert them as rows into (a backup copy of) the new database. Any ideas on how to do this in a reasonably safe way?
 Quote

Status: offline

etegration

Forum User
Full Member
Registered: 02/20/02
Posts: 179
backup everything (all 3 mySQL db) before you do anything. Retrieve just the tables you want with using data and structure. Then try importing what you want into the db you want, myphpAdmin can retrieve only what you want, just choose.
http://www.etegration.com.sg
http://www.itcow.com
http://www.ministryofhosting.com
 Quote

wfz

Anonymous
What happens if I copy only the columns that make sense and leave others blank or NULL? For example, in the story db, there is a storY ID database. I would probably want to leave that blank or null for import into the new table, yes? Is GL smart enough to fix any blank or NULL columns and cells in a table, or is that going to blow it up?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by wfz: What happens if I copy only the columns that make sense and leave others blank or NULL?
If you check the table definitions in sql/mysql_tableanddata.php, you\'ll see that some - but not all - fields have a default value. You could leave those blank and MySQL would use the default values for them. Whether that makes sense or not depends on the context, though. For example, the default topic for stories is \"General\" - which doesn\'t make a lot of sense in case you deleted that topic ...
Quote by wfz:For example, in the story db, there is a storY ID database. I would probably want to leave that blank or null for import into the new table, yes?
No, you don\'t want that, believe me ... bye, Dirk
 Quote

wfz

Anonymous
With the added input from Dirk and using mysql_tablesanddata.php as a reference guide, the \"restore from tables\" approach is actually working pretty well....
 Quote

All times are EDT. The time is now 01:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content