5.启动新版本实例
注意:配置文件必须配置正确,如果配置了旧的参数,会导致实例无法启动
/etc/init.d/mysqld-5.6 start
然后观察错误文件,会看到如下报错:
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MySQL 50518, now running 50626. Please use mysql_upgrade to fix this error.
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
6. 运行新版本下的升级脚本进行升级检查,修复mysql库中的主要表
/usr/local/mysql-5.6/bin/mysql_upgrade -u root -proot
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: /usr/local/mysql_5.6/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql-5.6/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock'
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock'
Warning: Using a password on the command line interface can be insecure.
babysitter.abc OK
babysitter.account_tactics_daily_availability OK
babysitter.andtlhz_new OK
7. 检查完后重启实例
/etc/init.d/mysqld-5.6 restart
配置文件
[client]
#default-character-set = utf8
port = 3306
socket = /tmp/mysql6.sock
[mysqld]
#skip-grant-tables
user = mysql
port = 3306
socket = /tmp/mysql6.sock
pid-file = /usr/local/mysql-5.6/data/mysql-upgrade-master.pid
#pid-file = /usr/local/mysql-5.6/data/[主机名].pid
#pid-file = /usr/local/mysql-5.6/data/[主机名].pid