vincen 发表于 2018-10-6 06:29:22

MySQL5.5 升级到MySQL5.6的注意事项

  MySQL5.5 升级到MySQL5.6的注意事项
  1、如果表有时间字段,在升级之后该表必须rebuild一次,才能执行online ddl.
  https://dev.mysql.com/doc/refman/5.6/en/upgrading-from-previous-series.html
  解决方法:
  mysql>alter table table_name force;#会锁表
  或者使用pt工具,优势在于不锁表,另外共有云上环境也能使用pt-tools工具
  # pt-online-schema-change --no-version-check --no-drop-old-table --execute --print--alter "force" h='',P=3306,u=root,p='',D='',t=''

页: [1]
查看完整版本: MySQL5.5 升级到MySQL5.6的注意事项