Techy issue .... MySQL3 to MySQL5
Jan. 9th, 2009 09:43 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
OK ... I need to move some databases off a server running MySQL3 to another running MySQL5 (both are FreeBSD based) ...
How do I do it (someone said i can simply copy the mysqldump from the server running V5 to the server running v3, run it and then just restore on the 5 - does this sound feasible ?)
Ta
How do I do it (someone said i can simply copy the mysqldump from the server running V5 to the server running v3, run it and then just restore on the 5 - does this sound feasible ?)
Ta
(no subject)
Date: 2009-01-09 09:53 am (UTC)But yes, it sounds plausible. Extract the data from the existing database, copy it to the new server, and then re-insert it. I'm taking your word for it that extraction and insertion tools exist ;-)
(no subject)
Date: 2009-01-09 10:04 am (UTC)Separately, you'll need to recreate the required users on the v.5 server.
(no subject)
Date: 2009-01-09 10:28 am (UTC)Using the wrong version of dump sounds like a road to a headache. What happens if the internal format of the data has changed (which seems likely)? eg. from 8 bit characters to UTF-16? (ok, this example is probably obsolete, but it's just an example): the v5 mysqldump will read 2 bytes, and treat them as a single character. So the process might not throw an error, but will corrupt all the data. In practice, it'll probably not be anything this coarse, but that just makes it harder to know if there's an issue.
(no subject)
Date: 2009-01-09 10:47 am (UTC)(no subject)
Date: 2009-01-09 12:18 pm (UTC)(no subject)
Date: 2009-01-09 06:37 pm (UTC)(no subject)
Date: 2009-01-09 06:39 pm (UTC)(no subject)
Date: 2009-01-09 07:58 pm (UTC)(no subject)
Date: 2009-01-09 06:34 pm (UTC)mysqldump -u root --password=xxx -h oldhost olddbname | \
mysql -u root --password=yyy newdbname
(You might want to be more selective over the account name, or try importing the resulting dump into a new, trial database first...)
There's a compatibility switch, e.g.:
--compatible=mysql323
which tells mysqldump to create a dump suitable for feeding into said version - handy going from a newer system to an old one, but since you're going the other way, you should be okay.
(no subject)
Date: 2009-01-09 06:59 pm (UTC)True.
...and also assuming that the chosen user is allowed to connect to the database from the new server. I think about MySQL security just infrequently enough that it makes my head hurt every time.