upgrading system
Always backup data before you upgrading.
error message:
After upgrding, mysql cann't start, the error messages:
091022 12:10:47 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
091022 12:43:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
091022 12:43:12 [Warning] The syntax '--log' is deprecated and will be removed in MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
091022 12:43:12 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file' instead.
091022 12:43:12 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
091022 12:43:13 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
091022 12:43:15 InnoDB: Started; log sequence number 5 2569810710
091022 12:43:15 [ERROR] /usr/sbin/mysqld: unknown option '--skip-bdb'
091022 12:43:15 [ERROR] Aborting
091022 12:43:15 InnoDB: Starting shutdown...
091022 12:43:17 InnoDB: Shutdown completed; log sequence number 5 2569810710
091022 12:43:17 [Warning] Forcing shutdown of 1 plugins
091022 12:43:17 [Note] /usr/sbin/mysqld: Shutdown complete
fix error:
open /etc/mysql/my.cnf, remove --skip-bdb
start mysql with: sudo /usr/bin/mysqld_safe --skip-grant-tables
upgrade and fix:sudo mysqlcheck --check-upgrade --all-databases --auto-repair
upgrade again, probably not needed: sudo mysql_upgrade
remove innodb_log_arch_dir if you have it
Then mysql should be able to start even there is still other errors like Plugin 'FEDERATED', event table, etc...
fix warnning:
replace log with general_log
replace log_slow_queries with slow_query_log if you have it
fix table:
run mysqlcheck --all-databases --auto-repair again
if you got messages like: error : Table upgrade required. Please do "REPAIR TABLE TABLENAME" or dump/reload to fix it!
you need to dump that table(or the full database) and reload it again, you can also run repair table like: "REPAIR TABLE name1, name2..."