laradock mysql5.6数据迁移mysql5.7(Table 'performance_schema.session_status' doesn't exist)

前些天在mysql5.6上搞实验,意外的将mysql5.6换成了5.7,连接数据库时报错Table 'performance_schema.session_status' doesn't exist

解决方案

  • 启动mysql容器,进入bash环境
    docker-compose up -d mysql
    docker-compose exec mysql bash
  • 执行升级操作
    find / -name mysql_upgrade // 查找到该文件位于(/usr/bin/mysql_upgrade)
    cd /usr/bin
    mysql_upgrade -u root -p --force // 升级
    重启mysql

总结

要细心(还原5.6没找到怎么还原,只能用5.7凑合用用了)

你可能感兴趣的:(laradock mysql5.6数据迁移mysql5.7(Table 'performance_schema.session_status' doesn't exist))