Skip to main content

Reply to comment

Upgrading mysql port

Your rating: None Average: 5 (1 vote)

Found this somewhere. Good to follow for a mysql portupgrade.

Buy and Sell Cisco Network Gear.

You need to be very careful about performing this update. The procedure I followed was:

1. Shutdown mysql and mysql-dependent services first
2. Use mysqldump to backup database mysql tables db, columns_priv, tables_priv and user (you should not need this)
3. Use mysqldump to backup your other databases
4. Use portupgrade -o to upgrade mysql-client, mysql-server, mysql-scripts and any mysql-dependent ports
5. Re-create /usr/local/etc/my.cnf from appropriate my-{small,medium,large,huge}.conf in /usr/local/share/mysql (settings have changed)
6. Start mysql as normal
7. Execute mysql_upgrade as mysql root user
8. If mysql_upgrade indicates some tables need REPAIR or dump/restore, execute mysql and source your other databases backup to recreate the broken tables
9. Restart mysql as normal
10. Start your mysql-dependent services
11. Delete old mysql client libraries from /usr/local/lib/compat/pkg/

This might seem long-winded but it's the only way to ensure that you have access to data and user information from the previous version of mysql and that changes to configuration variables are managed for the new version.

The mysql database backup (privilege information) shouldn't be required but it's wise to have it there in case that aspect of the mysql_upgrade fails and manual recovery of users/passwords/privileges would be difficult and error-prone.

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.