Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I previously installed MySQL 5.1 using the installer, since then created a number of users/databases, and now would like to upgrade to 5.6. What is the procedure to do so?

share|improve this question
add comment

1 Answer 1

The following assume your MySQL 5.1 is installed in /usr/local/mysql-5.1.46-osx10.6-x86_64 and that MySQL 5.6 will install in /usr/local/mysql-5.6.11-osx10.7-x86_64. The exact directory names might differ depending on the exact version number you are using.

  • Download the MySQL 5.6 installer, for instance in DMG format, and run mysql-5.6.11-osx10.7-x86_64.pkg
  • Stop the server
    • With MySQL Workbench, go to Server Administration
    • open mysql@localhost (add connection if not there)
    • under Startup / Shupdown, click Stop Server
  • Create backup of 5.6 data directory: sudo mv /usr/local/mysql-5.6.11-osx10.7-x86_64/data /usr/local/mysql-5.6.11-osx10.7-x86_64/data.save
  • Copy data directory from 5.1: sudo cp -a /usr/local/mysql-5.1.46-osx10.6-x86_64/data /usr/local/mysql-5.6.11-osx10.7-x86_64/
  • Start server (similar to stopping, see above)
  • Run mysql_upgrade, which checks all the tables and upgrades system tables
  • Check data there, with MySQL Workbench
    • In Server Administration, under Users and Privileges, check the expected users are present
    • In SQL Development, open a connection to the database, and run a few queries to check the expected data is present.
  • In MySQL Workbench, if getting "Error deleting password entry error when connecting with MySQL Workbench", upgrade to the latest version of MySQL Workbench
share|improve this answer
    
Just a comment. If you've set up a password on the mysql 'root' account you may need to issue the command: mysql_upgrade -u root -p and enter the password when prompted. Instead of just mysql_upgrade –  Adam Christianson Sep 18 '13 at 7:09
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.