The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 What's the best way to upgrade mysql?
Author: el_kab0ng 
Date:   22-01-07 19:18

I installed mysql4 from ports... now it seems I need to move to 5 to gain some additional support for my users. What would be the best way to accomplish this?

Portupgrade doesn't see it, because it's the latest 4.0 version... so I'm weighing in my options here to prevent from losing data.

Thanks in advance!

echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: Dan 
Date:   22-01-07 19:24

el_kab0ng wrote:

> I installed mysql4 from ports... now it seems I need to move to
> 5 to gain some additional support for my users. What would be
> the best way to accomplish this?

portupgrade -o databases/mysql51-server mysql-server

> Portupgrade doesn't see it, because it's the latest 4.0
> version... so I'm weighing in my options here to prevent from
> losing data.

What do you mean by "portupgrade doesn't see it"? If you installed it from ports, portupgrade should know about it. What, exactly, happened?

--
Webmaster

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: el_kab0ng 
Date:   22-01-07 19:27

I just ran portupgrade -arR -i and was never prompted to upgrade mysql. It might be because the version of mysql I have installed is the last update to the 4.0 series and doesn't know to move to 5.0?

echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: Dan 
Date:   22-01-07 19:39

el_kab0ng wrote:

> I just ran portupgrade -arR -i and was never prompted to
> upgrade mysql. It might be because the version of mysql I have
> installed is the last update to the 4.0 series and doesn't know
> to move to 5.0?

5 is completely different port. Portupgrade would not upgrade it. Use the -o option I suggested.

Read up on what upgrade magic you may need for a 4 => 5 upgrade. I am not aware of any.

--
Webmaster

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: el_kab0ng 
Date:   22-01-07 20:02

Figures. Anyway, upgrade in progress based on your suggestions. The only gotcha was that the client needed to be upgraded first before server.

echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: Dan 
Date:   22-01-07 20:07

In which case you issue both commands at the portupgrade level and portupgrade decides which one to do first.

--
Webmaster

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: el_kab0ng 
Date:   22-01-07 20:11

Of course for some reason portupgrade pulled the mysql-5.1.14-beta port instead and failed on upgrading..

I'll keep digging to see what I can do.

echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc

Reply To This Message
 
 Re: What's the best way to upgrade mysql?
Author: dln 
Date:   25-02-07 01:29

That is because mysql 5.1 is what you asked for.

If you want 5.0.X, then

portupgrade -o databases/mysql50-server mysql-server

There are some migration scripts you will need to run in order to upgrade your existing databases from 4.x, mainly the system databases in 'mysql' to add support for a few more permission types. These are installed as part of the port.

You will need to import timezone information.

You may also need to set the default charset on your existing databases and rebuild indexes to fix possible collation issues (I don't recall if this is still needed, and in fact I don't think it is strictly needed unless you intend to use any charset but the default).

There may well be other things I have not mentioned, but I think most of the issues in upgrading are more than adequately covered in the mysql documentation, upgrade and release notes.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org