Solved

MySQL 4 to MySQL 5

Posted on 2013-05-31
3
277 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
3 Comments
 
LVL 23

Accepted Solution

by:
nemws1 earned 500 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 82

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now