Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-06-2021, 02:49 PM   #1
ruff
I have a plan
 
ruff's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: WA - St Kitts
Posts: 5,406
Anyone ever merge 2 different mySQL databases?

I'm trying to cobble together a new TGPX site. I've got a mySQL database with 12 years of daily updates in text form that I would like to merge into a new database.
Is this doable? Has anyone ever done it or know someone who has?
I may have to get a copy of mySQL for dummies otherwise.

Now just because I mentioned TGPX, I don't want everybody here to start building TGP sites. Promise?
__________________
Slixa
ruff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 03:04 PM   #2
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,234
Funny, i think i did same for same reason, but i don't remember what exactly i was doing it then.
__________________
For GFY administration inquiries- email info at gfy.com or send PM.
For advertising inquiries - email marketing at gfy.com

Inquiries which are not related to administration or advertising on GFY wont be processed.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 03:08 PM   #3
S3X_Jay
Registered User
 
S3X_Jay's Avatar
 
Industry Role:
Join Date: Dec 2020
Location: NYC (Harlem)
Posts: 38
Quote:
Originally Posted by ruff View Post
I'm trying to cobble together a new TGPX site. I've got a mySQL database with 12 years of daily updates in text form that I would like to merge into a new database.
Is this doable? Has anyone ever done it or know someone who has?
I may have to get a copy of mySQL for dummies otherwise.

Now just because I mentioned TGPX, I don't want everybody here to start building TGP sites. Promise?
It's doable. Just some SQL statements. What they would look like depends on the data structure of the databases.
__________________
For the past 12+ years I've focused on building & running gay affiliate sites.
S3X_Jay is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 03:19 PM   #4
ruff
I have a plan
 
ruff's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: WA - St Kitts
Posts: 5,406
I'm learning just enough to fuck up. But the installation is new so I backed up the new empty database for good measure. So I will try to figure out the data structure and match what I have to what the TGPX database has.
__________________
Slixa
ruff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 04:36 PM   #5
Pink24
So Fucking Banned
 
Industry Role:
Join Date: Aug 2019
Posts: 1,436
Quote:
Originally Posted by ruff View Post
I'm learning just enough to fuck up. But the installation is new so I backed up the new empty database for good measure. So I will try to figure out the data structure and match what I have to what the TGPX database has.
If you need any help let me know.


j/k yer feckin worm
Pink24 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 04:48 PM   #6
ruff
I have a plan
 
ruff's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: WA - St Kitts
Posts: 5,406
Judging by the questions you continually ask on this forum, it's doubtful that you know anything useful.
__________________
Slixa
ruff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 04:55 PM   #7
Pink24
So Fucking Banned
 
Industry Role:
Join Date: Aug 2019
Posts: 1,436
Quote:
Originally Posted by ruff View Post
Judging by the questions you continually ask on this forum, it's doubtful that you know anything useful.
Bet I know more than you.

I might act stoopid (for fun) but I have an IQ of some high number.
Pink24 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 05:21 PM   #8
PornDiscounts-V
Confirmed User
 
PornDiscounts-V's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: L.A.
Posts: 5,739
Completely doable. You just need to import the data according to the new structure.
__________________
Blog Posts - Contextual Links - Hardlinks on 600+ Blog Network
* Handwritten * 180 C Class IPs * Permanent! * Many Niches! * Bulk Discounts! GFYPosts /at/ J2Media.net
PornDiscounts-V is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 05:24 PM   #9
sarettah
l8r
 
Industry Role:
Join Date: Oct 2002
Posts: 13,440
Merged databases many times.

Some were easy, some a bitch.

Have fun.

.
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-06-2021, 11:51 PM   #10
carolwebb
Confirmed User
 
Industry Role:
Join Date: Jan 2020
Posts: 221
Can you dump the old table info into a csv file, then upload the csv to the new database table?

Like so?
SELECT customer_id, firstname, surname INTO OUTFILE '/customers.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM customers;


LOAD DATA INFILE '/customers.csv'
INTO TABLE customers
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
__________________

BCams
:
hard core redditor
carolwebb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2021, 07:30 AM   #11
ruff
I have a plan
 
ruff's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: WA - St Kitts
Posts: 5,406
Quote:
Originally Posted by carolwebb View Post
Can you dump the old table info into a csv file, then upload the csv to the new database table?

Like so?
SELECT customer_id, firstname, surname INTO OUTFILE '/customers.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM customers;


LOAD DATA INFILE '/customers.csv'
INTO TABLE customers
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
I'm going to try that and see if it works. Thx.
__________________
Slixa
ruff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2021, 07:45 AM   #12
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,157
Quote:
Originally Posted by ruff View Post
I'm going to try that and see if it works. Thx.
We do this all the time. That way won't work well for you because the table would have to have fields in the same order.

You should make one user that has access to both databases and then do something like

INSERT INTO `newDb`.`newTable` (col1,col2,col3,col4,col5) SELECT correspondingcol1,correspondingcol2,correspondingc ol3,correspondingcol4,correspondingcol5 FROM `oldDb`.`oldTable`
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2021, 07:55 AM   #13
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,774
I obviously don't know how TGPX's tables are structured but if you have any relational tables in there then I wouldn't attempt this until you understand what they are and what tables they join to, otherwise just copying rows from one table to another will muck up the indices. Make sure you back everything up because you are bound to screw this up several times over and SQL doesn't have an undo button.
redwhiteandblue is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2021, 01:44 PM   #14
ruff
I have a plan
 
ruff's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: WA - St Kitts
Posts: 5,406
Thanks for the advice K0nr4d and redwhiteandblue.

MojoHost is dumping the databases for me to work on offline and suggested some links for programs to use. Since the TGPX site is brand new, I can always re-install everything if I wreck the merge. It will be worth it though if it works.
__________________
Slixa
ruff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
mysql, tgpx, database, merge, dummies, copy, sites, tgp, building, promise, mentioned, start, site, cobble, databases, doable, form, daily, updates, text
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.