469,140 Members | 1,202 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,140 developers. It's quick & easy.

upgrading from 4.1.12 to 5.0.1

my question is can i just install the new version of mysql, stop the
old, point the data directory for the new one to the data directory and
just start up mysql 5? or do i need to take some extra steps int eh
process. also is there any data corruption possible in the process i
described

Dec 14 '05 #1
5 1467
"Shiraz" <sh*****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
my question is can i just install the new version of mysql, stop the
old, point the data directory for the new one to the data directory and
just start up mysql 5? or do i need to take some extra steps int eh
process. also is there any data corruption possible in the process i
described


There is always data corruption possible! A system admin friend of mine
said, "always assume the computer is out to get you... not users in general,
but YOU. It's personal."

First, read the following pages, and perform the recommended steps.
Consider if your databases or applications use any of the features for which
there are incompatible changes between 4.1 and 5.0.
http://dev.mysql.com/doc/refman/5.0/...-from-4-1.html
http://dev.mysql.com/doc/refman/5.0/en/news-5-0-x.html

Back up your databases under MySQL 4.1, then then restore the databases
using MySQL 5.0. That is the safer procedure. Plus you have a backup
(which should be your daily habit already).

I recommend against configuring two instances of MySQL to use the same data
directory, because if both of them are running simultaneously, they are
_certain_ to corrupt the databases. You might forget to disable MySQL 4.1
as a starts-during-boot service, and then next time you reboot, both
instances will start up, and they'll be writing to the same data dir.

Also be sure to get the latest production release of MySQL 5.0, which is
currently 5.0.16. 5.0.1 is 18 months old, and it is pre-beta software.

Regards,
Bill K.
Dec 15 '05 #2
"Shiraz" <sh*****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
my question is can i just install the new version of mysql, stop the
old, point the data directory for the new one to the data directory and
just start up mysql 5? or do i need to take some extra steps int eh
process. also is there any data corruption possible in the process i
described


There is always data corruption possible! A system admin friend of mine
said, "always assume the computer is out to get you... not users in general,
but YOU. It's personal."

First, read the following pages, and perform the recommended steps.
Consider if your databases or applications use any of the features for which
there are incompatible changes between 4.1 and 5.0.
http://dev.mysql.com/doc/refman/5.0/...-from-4-1.html
http://dev.mysql.com/doc/refman/5.0/en/news-5-0-x.html

Back up your databases under MySQL 4.1, then then restore the databases
using MySQL 5.0. That is the safer procedure. Plus you have a backup
(which should be your daily habit already).

I recommend against configuring two instances of MySQL to use the same data
directory, because if both of them are running simultaneously, they are
_certain_ to corrupt the databases. You might forget to disable MySQL 4.1
as a starts-during-boot service, and then next time you reboot, both
instances will start up, and they'll be writing to the same data dir.

Also be sure to get the latest production release of MySQL 5.0, which is
currently 5.0.16. 5.0.1 is 18 months old, and it is pre-beta software.

Regards,
Bill K.

Dec 15 '05 #3
thanks for the advice. actually i am about to install 5.0.15, missed
that on my post. i am a newbie and any and all advice is appreciated.

i am planning to back up the database anyways, but due to limited
resources, i am not able to backup the database in one go using
mysqldump. for starters, the size of the DB is more than 250 GBs. but i
will do a data dump.

anyways when you say restore the DB, what do you mean by that? get the
mysqldump output and restore that?

anyways will come up with a plan by tomorrow and post it. hopefuly all
will go well.

Dec 15 '05 #4
"Shiraz" <sh*****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
i am planning to back up the database anyways, but due to limited
resources, i am not able to backup the database in one go using
mysqldump. for starters, the size of the DB is more than 250 GBs. but i
will do a data dump.
Mysqldump has many options for backing up individual tables. You can even
back up subsets of a specified table using the --where option. See
documentation.

Mysqldump output usually compresses very well, with tools such as Zip or
gzip.
anyways when you say restore the DB, what do you mean by that? get the
mysqldump output and restore that?


Yes, that is what I meant.

Regards,
Bill K.
Dec 15 '05 #5
I recently experimented with installing multiple MySQL instances on one
machine - here's what my experiences were:

In Windows, it was very easy, you would only have to make a 2nd
installation, using a different location and a different port. Then you'd
have to install a second service (I suppose, you'd like to run it as
service/deamon) and redirect the second installation to the different
service (MySQL Administrator is a great tool for this). That's all you
should have to do (except setting the MySQL privileges of course).

With Linux, there's a little more to do - again you would have to install
the second server on a different location. You need to run the
mysql_install_db script (if you install it using the tar.gz file) and
install the mysql.server in the /etc/init.d directory (of course, use
another name as the existing start up file for the other server). You will
probably have to make some changes in it - to set the data directory, the
base directory, the different port and maybe other things. You should also
make the same settings in the my.cnf file, which should be located in the
data directory of each MySQL installation.

You also shouldn't forget to set the permissions right and it's good
practice to start the server with a separate user (mostly mysql) that only
has the required Linux privileges to do what's really necessary.

As Bill already said, you should be careful that both servers don't share
any resources - the minimum is to set different data locations and different
ports, but you should keep everything separated: the configuration files,
the InnoDB tablespaces, the log file locations a.s.o.

The best practice to transfer the data will be mysqldump - I don't think,
there is a more efficient (and secure) way to backup and restore your data.

However, you should also read this:
http://dev.mysql.com/doc/refman/5.0/...e-servers.html

Wish you good luck ;-)!

Markus
Dec 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by S. Crespel | last post: by
1 post views Thread by bartolomesintes | last post: by
6 posts views Thread by Michael Foord | last post: by
reply views Thread by Jonathan Hilgeman | last post: by
2 posts views Thread by wellington fan | last post: by
5 posts views Thread by Mike Owen | last post: by
11 posts views Thread by Aidan Tobin | last post: by
1 post views Thread by progTiger | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.