LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-22-2005, 10:01 PM   #1
ivj
Member
 
Registered: Jul 2004
Posts: 61

Rep: Reputation: 15
How do I update mysql?


I'm not talking about the UPDATE statement... I'm actually talking about updating from one version to another... I've never done it, so naturally I have concerns.

First of all, I'm running Fedora 1

Second, my current mysql is 4.1.3-beta (and they have 4.1.13 out already)

Third, I seem to have some old rpm (rpm -q mysql gives me like mysql-3.23.58-4), but that's not the one that's running...

So basically I want to upgrade to 4.1.13 (since 5.x is in beta)

1) How do I back up my current mysql? I want a sort of back up where i can just copy/paste some files and restart the server and everything would start working again...

2) Should I go ahead and rpm -e mysql? Since the old thing isn't running, I should be safe, right?

3) How do I actually perform an update?

Thanks!
 
Old 07-22-2005, 11:17 PM   #2
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
If you want to back up your entire mysql structure you should

Code:
mysqldump -u root -p --single-transaction --all-databases > database_backup.sql
Then with the new DB
Code:
mysql -u root -p < database_backup.sql
 
Old 07-22-2005, 11:22 PM   #3
ivj
Member
 
Registered: Jul 2004
Posts: 61

Original Poster
Rep: Reputation: 15
Ooo pricless thanks! Anybody with knowledge on how to actually update it properly?
 
Old 07-23-2005, 12:23 AM   #4
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Well here's the thing. If you initially installed with an RPM you should be able to just upgrade the package as you would any other package; since you're using Fedora you can probably do this with up2date tool or by downloading the package from mysql.com It may even preserve your databases intact.

You will have to make sure that there are no update scripts you need to run, however, after you upgrade. Recently mysql has been adding all sorts of features that require you up update existing tables (like the privilege table from 3.2 > 4.0 > 4.1). The package will probably do this for you though.

I'm not sure why the only package you have is outdated though, did you build mysql from source ? If you initially installed by building from source, you may be in for a headache.

I'm not versed on using rpm to update packages though since I use [sl]apt-get.
 
Old 06-29-2006, 02:44 AM   #5
timtak
LQ Newbie
 
Registered: Jan 2004
Posts: 22

Rep: Reputation: 0
Question updating mysql on redhat 9

I am using redhat 9 -- the last free one -- and it seems to have neither apt-get or yum installed. up2date says that there is nothing to update.

I was considering compiling from source as explained in detail here
http://linuxnew.blogspot.com/2004/05...th-redhat.html
and I got as far as finding out the things that I need to uninstall
mysql-3.23.58-1.9
mysql-devel-3.23.58-1.9
perl-DBD-MySQL-2.1021-3
php-mysql-4.2.2-17.2
mysql-server-3.23.58-1.9
but then I got scared. What if I can't unistall them all. I would much rather use an rpm.

I think that somewhere there is a chanel specification in my up2date that is telling me to access redhat's rpm service which has reached its "end of life" so perhaps i could change the channel specification so that it goes to find rpms at another repository. But I am not sure how to do that.

Dag's site
http://dag.wieers.com/packages/apt/
looks promising as a way of instalilng apt or yum, and mentions changing the channel for up2date but only for those using fc3 or above and anyway I could not get it to work.

So I have mysql 3.x and need 4.16 or above to use unicode.

maybe I should bite the bullet and use the compiling method so kindly explained at the site above.

Suggestions?

Tim

Last edited by timtak; 06-29-2006 at 02:53 AM.
 
Old 06-29-2006, 03:25 AM   #6
timtak
LQ Newbie
 
Registered: Jan 2004
Posts: 22

Rep: Reputation: 0
OKaaaay

Redhat 9 was great while one could still just press the redhat update icon or use "up2date" in the terminal and it would update the whole system for you.

But then there was that redhat end of life.

However, it seems that there is a way of having all that up2date could do and more - install yum.

This seems to be the mega whammy way of updating redhat9
http://www.fedoralegacy.org/docs/yum-rh9.php
it explains how to install yum on redha9 9 and then yum update gives me a list of about (oh s***) 200 things that can be updated. I will have a look for a way of selecting those things that I want updated.

Alas however, it seems that there is no way of selecting things that I want updated, perhaps because the updated mysql may (or probably will) depend on updating other things.

So in response to the suggestion that one use
yum update mysql
someone says
Quote:
you wanted to run "yum update" not "yum update mysql". You'll miss things when you declare a specific package.
http://www.atomicrocketturtle.com/fo...aaa202664c0e2f

So I guess I just have to update the whole caboodle!

yum said it had resolved dependencies and asked, politely,
Is this okay (y/N)
and I went and typed y. Since it seems to be updating just about ever piece of software on this system, it may take quite a while (several hours by the look of things). Fingers crossed. If this works it will be super.

hmmm...it is still downloading many different software packages, but alas, looking at the list, mysql 4.x does not even seem to be one of the packages that it is looking to update to. Reading through fedora legacy policy, it seems that they only mean to update things that have security issues.

Hence yum via Fedoray legacy may only update those packages that have security issues.

It also seems, however, that it is possible to update the kernel using yum (even if on other sites do not recommend this method of updating the kernel) so perhaps if I update to FC4 it will then provide yum updates to newer software packages irrespective of whether they are securities issuses, bugfixes, or just plain upgrades.

Tim

Some keywords as I found this solution (I live in hope) difficult to find
(installing yum on redhat9, insall yum on redhat, yum for redhat, redhat9 and yum, using yum with redhat)

Last edited by timtak; 06-29-2006 at 03:46 AM.
 
Old 06-29-2006, 06:40 AM   #7
timtak
LQ Newbie
 
Registered: Jan 2004
Posts: 22

Rep: Reputation: 0
Yes, as feared. yum update updated loads of things on my server, but mysql stays at 3.x!

update mysql says that there are no new files. I guess that this is because fedora legacy does not provide new packages only bug fixes.

yum update kernel also does not find anything to update.

Tim
 
Old 06-30-2006, 03:00 AM   #8
timtak
LQ Newbie
 
Registered: Jan 2004
Posts: 22

Rep: Reputation: 0
It seems that even if I remove the "exclude=kernel*" line of /etc/yum.conf then I only get an update of redhat9 and if I use
yum upgrade kernel
then I am told
Quote:
Gathering header information file(s) from server(s)
Server: Red Hat Linux 9 - Base
Server: Fedora Legacy utilities for Red Hat Linux 9
Server: Red Hat Linux 9 - Released Updates
Finding updated packages
Downloading needed headers
Finding obsoleted packages
No Upgrades available for kernel.
So it is not easy to upgrade the kernel using yum. Similarly, even with the most updated redhat9, when i use the command
yum upgrade mysql
I am told
Quote:
Gathering header information file(s) from server(s)
Server: Red Hat Linux 9 - Base
Server: Fedora Legacy utilities for Red Hat Linux 9
Server: Red Hat Linux 9 - Released Updates
Finding updated packages
Downloading needed headers
Finding obsoleted packages
No Upgrades available for mysql.
So it does not seem to be easy to upgrade mysql or the kernel using yum. Yum has done a lot for improving the security of my system, but I am getting no nearer to my goal of upgrading mysql.

Meanwhile, what does Linuxquestions say about the way to update mysql?
Here it seems it is necessary to uninstall mysql before installing the new version.

My fears are
1) I would uninstall the wrong things.
2) I would fail to uninstall some of the mysql.
3) I would get the wrong rpm from mysql (none of them say "This is the one for redhat9, but say crpyting things about i836 or something)
4) That I would fail to get my database, users, passwords, and permissions into the new database

I wish there were something like "yum upgrade mysql" that worked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
UPdate of MySQL 3.23.58 to 4.0 Fredstar Linux - Newbie 2 10-17-2004 01:33 PM
mySQL table update DropHit Linux - Software 5 02-04-2004 11:47 PM
MySql remove or update? debaire Linux - General 5 07-10-2003 07:39 PM
Yet another MySQL update jeremy LQ Suggestions & Feedback 0 09-28-2000 11:29 PM
MySQL update jeremy LQ Suggestions & Feedback 0 08-26-2000 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration