Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

MySQL 4 to MySQL 5

Our web host is forcing us to go to MySQL 5. I'm sure there are a lot of good reasons, I don't have time to be forced to do this RIGHT NOW.

I have been lead to believe that I will have to export ALL the current SQL content, create a new MySQL 5 database & import it all back in.

Is that true?

We have maybe 200 php programs, all of which we would have to change the connection string on.

Is there an easier way to do this?
0
Richard Korts
Asked:
Richard Korts
1 Solution
 
nemws1Commented:
Well, if you're going through your code anyways, you might want to put your connection string into a library and then load that into all your code.  Next time, you'll only have to update one line.  Or better yet... create a library that maps each project/application to a connection string - then you can use multiple servers and only have 1 file to update.  I know ... hindsight is 20/20. ;-)

You are correct for the most part.  It's been *years* since I upgrade to MySQL 5, so its hard to remember any caveats, but I don't remember any all-night-long process or anything similar to that.  If there were any issues, I was able to fix them easily (and I didn't know as much about SQL then as I do now)
0
 
Richard KortsAuthor Commented:
To nemws1,

Yes, of course, I should do that anyway. If this project continues, we will go to another host anyway.

Thanks
0
 
Dave BaldwinFixer of ProblemsCommented:
If you change hosts, you can probably expect to be put on a server with newer versions of everything, PHP, MySQL, and Apache.  Nobody is going backwards and keeping old versions on new servers.  I think I have one site left on PHP4 and MySQL4 and that host would really like me to move to a newer server so they can shut that one down.

Note that PHP 5.3 and 5.4 are pickier about a lot of errors than previous versions.  They have also removed / obsoleted some functions.  You probably want to make a plan to upgrade before you are forced to and find your code stops working.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now