I tend to follow the following rule for existing code-base:
If it's working fine, there is no need to upgrade unless there's a specific feature you are missing.
InnoDB does get some nice performance boosts in 5.5, but if your current use-case is not seeing any issues with your install, why upgrade?
If you ran some performance tests on a development server that indicates you are getting near your limit, you could try 5.5 to see if that helps any.
For future projects, I would definitely recommend 5.5, however.
Step 01 : Run this script to Dump Everything from MySQL 5.0
cd /root
MYSQL_CONN="-uroot -p..."
SQLSTMT="SELECT schema_name FROM information_schema.schemata WHERE"
SQLSTMT="${SQLSTMT} WHERE schema_name NOT IN"
SQLSTMT="${SQLSTMT} ('information_schema','mysql','performance_schema')"
MYSQL_OPTIONS="--skip-column-names -A"
mysql ${MYSQL_CONN} ${MYSQL_OPTIONS} -e"${SQLSTMT}" > /tmp/dblist.txt
DB_OPTIONS="--databases"
for DB in `cat /tmp/dblist.txt` ; do DB_OPTIONS="${DB_OPTIONS} ${DB}"
MYSQLDUMP_OPTIONS="--routines --triggers ${DB_OPTIONS}"
mysqldump ${MYSQL_CONN} ${MYSQLDUMP_OPTIONS} > MySQLData.sql
SQLSTMT="SELECT CONCAT('SHOW GRANTS FOR ''',user,'''"
SQLSTMT="${SQLSTMT}@''',host,''';') FROM mysql.user WHERE user<>''"
mysql ${MYSQL_CONN} ${MYSQL_OPTIONS} -e"${SQLSTMT}" > GetGrants.sql
mysql ${MYSQL_CONN} ${MYSQL_OPTIONS} < /root/GetGrants.sql | sed 's/$/;/g' > Grants.sql
rm -f GetGrants.sql
Step 02 : Backup config file
cp /etc/my.cnf /etc/my.cnf.50
Step 03 : Backup /var/lib/mysql
mv /var/lib/mysql /var/lib/mysql50
Step 04 : Uninstall MySQL 5.0
Step 05 : Install MySQL 5.5
Step 06 : service mysql start
Step 07 : Login to mysql
mysql -uroot
Step 08 : At the mysql prompt enter the following:
mysql> source /root/Grants.sql
mysql> source /root/MySQLData.sql
That's it.
Give it a Try !!!
I have suggested this before : MySQL upgrade 5.0.88 to latest
Best Answer
For MySQL 5.1.37 and prior, InnoDB does not take advantage of multiple CPUs/multiple cores. No amount of scaling up of hardware will ever make InnoDB go any faster. MySQL 5.1.38 first introduced the InnoDB Plugin which has many aspects of tuning now available for multiple CPU/multiple core engagement. This is now fully available as native InnoDB in MySQL 5.5./5.6. Here are my past posts on this subject
Sep 12, 2011
: Possible to make MySQL use more than one core?Mar 16, 2012
: Using multiple cores for single MySQL queries on DebianJul 23, 2012
: How to get the most out of MySQL on a QuadCore machine with 16 GB of RAM?Although it was released 2 months ago, I trust MySQL 5.6.10 thus far. I already gave a client that version from MySQL 5.0.51a. Check out this post from
Jan 19, 2012
: Which version of MySQL should I use? . The client's production server is replicating to the new MySQL 5.6 Cluster and waiting for the Client to cutover.As with any release of MySQL, you should always read the Release Notes. The only thing to worry about is not doing an upgrade correctly. Another risk is forgetting to run
mysql_upgrade
script to fix themysql.user
table's column layout.Personally, I am uncomfortable with a binary replacement. I have a method to upgrade from MySQL 5.0.88 straight to MySQL 5.6.10.
STEP 01 : mysqldump all databases except the mysql schema
STEP 02 : dump the grants as pure SQL commands
I have recommended this technique before : importing myisam 5.0 database into a 5.5 innodb server
STEP 03 load each file into a new MySQL 5.6 Instance
Before you can do anything, you have so set a password for root@localhost in MySQL 5.6
The temporary password is located in
~/.mysql_secret
. Login as root@localhost using that password. Then, change the password withWhile in the MySQL Client, simply run
That's all that's needed.
Give it a Try !!!
UPDATE 2019-06-24 13:30 EDT
For the benefit of Linux users and in response to the comment from @SherylHohman, I tested the above statements from STEP 01 and STEP 02 without MYSQL_CONN defined (left blank on purpose) in a Vagrant environment:
The statements I posted here 6 years ago still work in Linux. I ran these in MySQL 5.6.33