1

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.

4
  • 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, 2013 at 12:15
  • How much data do you have ??? Apr 18, 2013 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.
    – YasirA
    Apr 19, 2013 at 9:06
  • @Jack Douglas also hints that you need to request merging of your duplicate account. See dba.stackexchange.com/help/user-merge
    – YasirA
    Apr 19, 2013 at 12:08

2 Answers 2

3

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

-1

You need to follow the steps described in these documentations:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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