Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have been developing under MySQL v5.0 for a while now and need to upgrade to v5.5 to be in step with the hosted production server.

After having searched for precise steps to do this migration, I am still unclear as to how to go ahead.

Can anyone provide a clear list of actions needed to upgrade to version 5.5 ?

Thank you


Thank you for these answers. You are right, I should have given fuller info in my question. Notably - I am under Windows XP SP3.

Yes I did search through Google beforehand, hence my statement

"After having searched for precise steps to do this migration, I am still unclear as to how to go ahead."

To RolandoMySQLDBA : Thanks for the script, but I cannot see how I could adapt it.

share|improve this question
    
I'm with Pekka 웃 BUT, if you must continue, what platform are you on? A "clear list" is always problematic, since the steps vary by use case. –  Kyle Skrinak Apr 18 '13 at 12:15
    
How much data do you have ??? –  RolandoMySQLDBA Apr 18 '13 at 14:54
1  
If you want to comment someone's answer, please use 'Add comment' button below the answer you want to comment instead of posting your comment as the answer. Also, I would recommend you to associate your new account on this site with your account on Stackoverflow, so that you can accept one of the questions. To do that, go to your account page (click the link with your name on the top of the page) and click Associate account. Thanks. –  Yasir Arsanukaev Apr 19 '13 at 9:06
    
@Jack Douglas also hints that you need to request merging of your duplicate account. See dba.stackexchange.com/help/user-merge –  Yasir Arsanukaev Apr 19 '13 at 12:08
add comment

migrated from stackoverflow.com Apr 18 '13 at 14:40

This question came from our site for professional and enthusiast programmers.

2 Answers

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

share|improve this answer
add comment

You need to follow the steps described in these documentations:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.