LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-14-2008, 01:59 AM   #1
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
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.
 
Old 08-14-2008, 02:39 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.
 
Old 08-14-2008, 03:10 AM   #3
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by chrism01 View Post
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)

Cheers
 
Old 08-14-2008, 08:31 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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).
 
Old 08-15-2008, 01:50 AM   #5
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Ahh thanks..i see what your getting at but i'm only thnking so much about dumps as its what the MySQL doc suggests..
http://dev.mysql.com/doc/refman/5.0/...-from-4-1.html

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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[MySQL/CentOS4] I'm loosing my mind!!!!! Phr34Ck Linux - Software 1 03-02-2008 07:44 AM
sourceforge admins schneidz Programming 1 02-19-2007 08:03 PM
To the admins: chris318 Slackware 8 03-02-2005 08:42 PM
Domain Admins not Local ADmins - Samba 3.0.7 dlublink Linux - Networking 2 03-01-2005 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration