MySQL/migration: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
No edit summary
 
No edit summary
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
K,
==About==
here's how I do it:
This subpage is about migrating data between [[MySQL]] databases, i.e. backing up data to independent files, and restoring the data from those files back into a database
==Backing up==
 
#Make sure you've got [http://www.phpmyadmin.net PHPMyAdmin] running
There is a choice of tools for doing this.
and that's all happy. I won't cover this part here as it varies with
* [[Beekeeper Studio]], but only the paid versions
your set up.
* [[/CLI/]]: command-line interface
#Login and choose '''Export''' from the main page
* [[MySQL Workbench]] (GUI utility)
#Leave most of the default options. Specifically,
* [[PHPMyAdmin]] (web-based)
#*Format: SQL
==Related Resources==
#*Select the database(s) you want in the listbox
* [https://sourceforge.net/projects/automysqlbackup/ AutoMySQLBackup] ([https://web.archive.org/web/20081218005549/http://members.lycos.co.uk/wipe_out/automysqlbackup/ origin story])
#*etc.
#Checkmark 'Add DROP TABLE'. This will make sure that when you restore
from a backup, it will delete existing tables before restoring from the
backed up ones.
#Checkmark 'Save to file' at the bottom, or it will just dump it to
your browser window, and that's no fun.
#*You probably also want to use compression. These won't be huge files,
but a 1.5mb database compresses to about 150kb. So, y'know, whatever.
Wiggy recommends BZIP.
#Click '''Go'''.
==Restoring from backup==
''I'm writing this from memory, so I might be wrong, but I '''think'''
it's right.''
#Click '''Databases''' from the PHPMyAdmin main page
#Click the name of your databse (it should already exist; have you
[re]installed [http://www.mediawiki.org MediaWiki] yet? Do that first.)
#Click the '''SQL''' tab
#Where it says '''Location of textfile:''', browse to your latest
backup, then click '''Go'''.
Good luck :E

Latest revision as of 01:56, 25 February 2026

About

This subpage is about migrating data between MySQL databases, i.e. backing up data to independent files, and restoring the data from those files back into a database

There is a choice of tools for doing this.