# Upgrading Mysql



## artcurmudgeon (Dec 17, 2009)

On to another project, I have been told that since I just finished upgrading our moodle server, that I need to upgrade our Mysql server.

Currently it resides on a CentOS server running mysql 4.1.20, and I am upgrading it to freebsd.

Now for the question...

Can I do an mysqldump and move it to a mysql5.4 server or do I have to move it to same version and do upgrades?

Help!


----------



## Nightweaver (Dec 17, 2009)

Dumps should work just fine. So, dump and then import to 5.x or whichever version you intend to run on your BSD box.


----------



## artcurmudgeon (Dec 17, 2009)

Sweet...will start on it shortly...

BTW, is there any known reasons why I couldnt put /var/db/mysql(This is where the db resides, I think) on an nfs slice I sue so I could have it off the server and for back ups as well.

thanks


----------



## Nightweaver (Dec 17, 2009)

Good luck.

Did you get any errors in your logs? What exactly happened when you tried that? I see no reason for it to refuse to work from a NFS drive. Give us more details on what you did.


----------



## artcurmudgeon (Dec 18, 2009)

update so far....


Performed mysqldump with no hassles then tried to connect the centos server to the nfs share, and discovered that the pervious admin had not configured the networking correctly. 

Of course I had 2 options, 1)fix the networking and connect to the nfs and copy the dump over, or 2)just use ssh ftp and get myself free of this POS server...

Of course I picked #2, because in the end it took less than 4 minutes to copy to my employer provide win-blows box and then over to the new server.

Now I will be dumping the dump and bringing my brand new freebsd 7.2 mysql server online. Did I mention that this is also running under Xen as well..... 

be back later with another update...


----------



## artcurmudgeon (Jan 11, 2010)

As it stands I performed the dump on wed and then we had a snowday and so I redumped it on friday and cut it over. so far have only found 1 issue and that was with some data not being ported over...

It ran great over the weekend with no errors in logs, so today I am going to compare db and see if I need to redump individual db and reimport them...

but for now I am happy that all is good in my world....

thanks to all!


----------



## chrcol (Jan 20, 2010)

there is a mysql-upgrade script you can run after such an upgrade.


----------



## SirDice (Jan 20, 2010)

artcurmudgeon said:
			
		

> AIt ran great over the weekend with no errors in logs, so today I am going to compare db and see if I need to redump individual db and reimport them...


One way to test it is to setup the 'new' fbsd mysql server as a slave. Then everything gets copied pretty much automatically. Once you're completely satisfied break replication and start using the fbsd one exclusively.

Maatkit is a nice collection of tools (mainly perl scripts) that'll make life a little easier. It's in the ports, databases/maatkit.


----------

