Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL 4 to MySQL 5

Posted on 2013-05-31
3
Medium Priority
?
314 Views
Last Modified: 2013-05-31
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
Comment
Question by:Richard Korts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Accepted Solution

by:
nemws1 earned 2000 total points
ID: 39211245
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
 

Author Comment

by:Richard Korts
ID: 39211274
To nemws1,

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

Thanks
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39211641
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question