• mybatis框架——实战练习——mysql8安装——mysql8.0.29——用户名:root密码:123456数据库名:mysql8


    下载网址:https://dev.mysql.com/downloads/mysql/

    在C盘建立文件夹mysql8,并发下载的压缩文件放进去,并解压:

    新建my.ini配置文件,并输入如下内容:

    [client]
    # 设置mysql客户端默认字符集
    default-character-set=utf8

    [mysqld]
    # 设置3306端口
    port = 3306

    # 设置mysql的安装目录
    basedir=C:\\Program Files\\mysql8\\mysql-8.0.29-winx64\\mysql-8.0.29-winx64

    # 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
    # datadir=C:\\Program Files\\mysql8

    # 允许最大连接数
    max_connections=20

    # 服务端使用的字符集默认为8比特编码的latin1字符集
    character-set-server=utf8

    # 创建新表时将使用的默认存储引擎
    default-storage-engine=INNODB

    以管理员身份运行cmd.exe

    执行如下命令:

    切换到安装目录:

    cd C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin

    初始化数据库;

    mysqld --initialize --console

    执行完成后,会打印root的初始密码: =aEB%&xdS4zo

    输入以下安装命令:

    mysqld install

    启动输入以下命令即可:

    net start mysql
    C:\Windows\system32>cd C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin
    
    C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin>mysqld --initialize --console
    2022-05-21T05:08:32.502395Z 0 [System] [MY-013169] [Server] C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin\mysqld.exe (mysqld 8.0.29) initializing of server in progress as process 19696
    2022-05-21T05:08:32.503495Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
    2022-05-21T05:08:32.521934Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
    2022-05-21T05:08:32.987543Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
    2022-05-21T05:08:33.877566Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: =aEB%&xdS4zo
    
    C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin>mysqld install
    Service successfully installed.
    
    C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin>net start mysql
    MySQL 服务正在启动 .
    MySQL 服务已经启动成功。
    
    
    C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin>mysql -u root -p
    Enter password: ******
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    
    C:\Program Files\mysql8\mysql-8.0.29-winx64\mysql-8.0.29-winx64\bin>mysql -u root -p
    Enter password: ************
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version: 8.0.29
    
    Copyright (c) 2000, 2022, Oracle and/or its affiliates.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> show databases;
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    mysql> show database;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
    mysql> show database;
    

      

    =========================================================================

    下载Navicat;目前有14天免费试用期

    设置连接名:myslq8;

    用户名:   root

    密码:   =aEB%&xdS4zo

    创建一个新数据库,名为mysql8

    参考网址:

    https://blog.csdn.net/Dyoungwhite/article/details/122426288

    https://www.runoob.com/mysql/mysql-install.html

    修改新密码:  123456

  • 相关阅读:
    C# 使用NPOI 实现Excel的简单导入导出
    C# 根据Excel模版导出文件
    移动通信第九组网络抓包作业
    武金龙老师的教导(第9小组)
    【Python核心编程笔记】一、Python中一切皆对象
    自己喜欢的几个前端框架
    2018-1-6-个人博客、博客园、微信公众号、Github、本地同步写博客
    2018-1-6-IDEA快速代码生成
    CodeMirror动态修改代码(关键: editor.getDoc().setValue(data); editor.refresh();)
    FaceId枚举表(用于VBA的加载项)
  • 原文地址:https://www.cnblogs.com/xiaobaibailongma/p/16294942.html
Copyright © 2020-2023  润新知