forked from khoegenauer/tickets-cad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copy_db.txt
18 lines (13 loc) · 1.69 KB
/
copy_db.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
To copy the Tickets database from A to B: (using PHPMyAdmin, anyway)
Draft Nov 8, 2010
a. Firstly, I wd expect that the setting values for the Gmaps API key to be different between the databases, so copy B's contents someplace convenient. We'll want it later.
b. Use 'Config/Dump DB to screen', do that. Copy paste that long SQL statement using whatever text processor (not word processor!) you want and save that. (Make sure that file has "-- start start ... " at its top and " -- end end ..." at the bottom. These are just comments, but are useful cues the the file's boundaries.)
c. Log out of Tickets.
d. Using PHPMyAdmin, and for safety, let's just rename the existing database (B) to whatever you want. (So we can fall back to it if we need to.)
e. Create an empty database, using the name (B) that you had changed in step d.
f. Using copy/paste, copy the long SQL you have pasted into the text file in step b above.
g. Using PHPMyAdmin in the new empty database, click on the SQL tab, clear out the junk that's in the the form field, and paste the SQL into it. ("-- start start " and "-- end end " included; these are simply comments and are ignored.)
h. Clicking on the 'Go' button does the work. Takes just a few seconds.
i. When you're logged in successfully, ignore the complaints re the map key for now. Navigate to 'Config/Set GMaps API key', and paste the key value that you had saved in step a above.
Note: if you want to fall back to yr original database, that's trivial: Simply delete the new one (yes, delete) and rename the one you had saved in step d. above to the original name.
AS