• win10同时安装mysql8.0


    电脑上已经有mysql5.7,但是由于特殊要求需要再安装一个8.0版本

    下载初始化和5.7一样。(注意my.ini配置)

    1、安装服务

    1. E:\mysql-8.0.30-winx64\bin>mysqld install mysql80
    2. Install/Remove of the Service Denied!

    解决:
    要用管理员用户打开cmd

    1. E:\mysql-8.0.30-winx64\bin>mysqld install mysql80
    2. Service successfully installed.

    2、启动mysql

    net start mysql80

    3、输入初始密码登录

    1. E:\mysql-8.0.30-winx64\bin>mysql -u root -p
    2. Enter password: ************
    3. ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.

    解决:
    在my.ini中添加

    1. # 默认使用“mysql_native_password”插件认证
    2. default_authentication_plugin=mysql_native_password

    删除data目录,重新初始化mysql

    4、全量导出数据库
    登录mysql5.7导出:

    mysqldump -u root -p --all-databases --lock-tables > E:\all.sql

    登录mysql8.0导入:

    source E:\all.sql

    5、mysql8.0导入数据后,访问库报错

    1. SQL 错误 [1045] [28000]: Access denied for user 'shopping'@'%' (using password: YES)
    2. Access denied for user 'shopping'@'%' (using password: YES)

    查看日志:

    1. 2022-08-03T03:21:43.440745Z 8 [Warning] [MY-010929] [Server] Storage engine 'MyISAM' does not support system tables. [mysql.user].
    2. 2022-08-03T03:21:43.441568Z 8 [Warning] [MY-010929] [Server] Storage engine 'MyISAM' does not support system tables. [mysql.db].
    3. 2022-08-03T03:21:43.442352Z 8 [Warning] [MY-010929] [Server] Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv].
    4. 2022-08-03T03:21:43.443353Z 8 [Warning] [MY-010929] [Server] Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv].
    5. 2022-08-03T03:21:43.444344Z 8 [Warning] [MY-010929] [Server] Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv].
    6. 2022-08-03T03:21:43.445370Z 8 [Warning] [MY-010929] [Server] Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv].
    7. 2022-08-03T03:21:43.446478Z 8 [Warning] [MY-013143] [Server] Column count of mysql.user is wrong. Expected 51, found 45. The table is probably corrupted
    8. 2022-08-03T03:21:43.447392Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.db. The table is probably corrupted!
    9. 2022-08-03T03:21:43.448069Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.tables_priv. The table is probably corrupted!
    10. 2022-08-03T03:21:43.448791Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.tables_priv. The table is probably corrupted!
    11. 2022-08-03T03:21:43.449533Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.columns_priv. The table is probably corrupted!
    12. 2022-08-03T03:21:43.450272Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.procs_priv. The table is probably corrupted!
    13. 2022-08-03T03:21:43.450991Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.procs_priv. The table is probably corrupted!
    14. 2022-08-03T03:21:43.451705Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.proxies_priv. The table is probably corrupted!
    15. 2022-08-03T03:21:43.452430Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.proxies_priv. The table is probably corrupted!
    16. 2022-08-03T03:21:43.453202Z 8 [Warning] [MY-013139] [Server] Cannot load from mysql.proxies_priv. The table is probably corrupted!

    解决:
    因为mysql5.7中系统表默认引擎为MyISAM
    关闭服务,执行剩余升级任务:

    mysqld --skip-grant-tables --user=mysql --upgrade=FORCE

    参考资料:
    https://blog.51cto.com/u_15463439/5226839
    https://www.cnblogs.com/chengyunblogs/p/16112745.html
     

  • 相关阅读:
    文档图片阴影去除
    2022年陕西省工程师职称评审程序在这里,还怕上报不了职称吗?
    mybaits入门
    VUE day_07(7.25)学子商城项目简略版
    Linux常见的指令
    通信原理板块——信源信宿信息熵、离散信道信息传输速率和信道容量计算
    Redis(七) 主从复制(二)哨兵模式
    Pytorch学习——梯度下降和反向传播 03 未完
    Mac 微信定制化快捷键【截屏、标记、添加文字不再是问题】
    Unity打包出来的APK文件有问题总结
  • 原文地址:https://blog.csdn.net/csj50/article/details/126135789