MySQL admins out there...please help to get something straight in my mind???
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
MySQL admins out there...please help to get something straight in my mind???
Hi All,
I'm going to be soon making an upgrade to my MySQL server. Currently running version 4.1.x and upgrading to 5.0.x
I've read through the mysql upgrade pages but something still puzzles me a little although i think i know how to do it i just want to double check...no harm in that..
Ok so what i believe needs to happen is using the MySQL4 mysqldump(>) ...i dump all the databases i have in the MySQL4 installation. I then use these dumps with the MySQL5 mysqldump(<) and then after all databases are copied i then need to run mysql_upgrade or something similar i know what the command is just not straight off the top of my head....
Then as far as i'm aware that is that and everything should be hunky dory so i gather from the MySQL manual. Appart from perhaps now non-standard mysql queries but that's not my problem... i just want to make sure that what i have said here is all that's required to correctly upgrade MySQL from one version to another.
Also i'm pretty sure..but again want to make sure...that it has no effect if you then have different usernames etc on the new MySQL version with this method of dumping tables because all user information is done within the MySQL database itself and the dumped databases have no clue as to users do they...thats my understanding so far anyway
Thanks for the Advice in advance.
Regards
M
Last edited by helptonewbie; 08-14-2008 at 02:10 AM.
I think the point is to take mysqldump (or 2) before starting the upgrade process, in case it breaks your DB, There's no need to re-import if it all goes well.
Personally, I'd prob do a full dump so I can re-create 4.1 again, and also a 'create table' only dump and a data only dump that I could use if I decide to remove 4.1 and install 5.0 fresh (my personal pref). Then import the table creates and fix any probs (hopefully none), then data import.
If you get any probs, remember, the dumps are ASCII text, so you can always work 1 table at a time.
There are even thrs here and at MYSQL on how to have 2 copies running at once, so you can leave your 4.1 running and sort out your 5.0 at the same time.
I think the point is to take mysqldump (or 2) before starting the upgrade process, in case it breaks your DB, There's no need to re-import if it all goes well.
Personally, I'd prob do a full dump so I can re-create 4.1 again, and also a 'create table' only dump and a data only dump that I could use if I decide to remove 4.1 and install 5.0 fresh (my personal pref). Then import the table creates and fix any probs (hopefully none), then data import.
If you get any probs, remember, the dumps are ASCII text, so you can always work 1 table at a time.
There are even thrs here and at MYSQL on how to have 2 copies running at once, so you can leave your 4.1 running and sort out your 5.0 at the same time.
No need to re-import if all goes well....do you mean that you also just copied across the plain data files rather than doing a dump at all??
Why would you bother doing a full dump and then two more individual dumps one of structure the other of data...when you import this back into the new MySQL would you not end up with the same outcome...i guess you could find errors.. on a is it a table error when importing the structure side of a dump or is it data error when importing the data dump...so thinking about it, its probably not so bad...
Thanks,
Am i right in thinking it is...dump, import, upgrade script..finished (if no errors)
When you do a dump, it only dumps a COPY, it does NOT clear the DB, so there's no need to re-import IF the upgrade goes smoothly.
Hope thats clearer.
The dumps are in case you have problem(s).
It does say on a different page also that you can move the data files between server versions as they are...but they say only if its an upgrade within the same series of version.
I'm not criticizing what your saying by any means, i just want to make sure i do it all correctly.
Thanks for you help and comments i always appreciate the different view points,
Regards
M
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.