zoukankan      html  css  js  c++  java
  • MySQL解压版安装教程

    1.下载

    1.1 下载地址

    mysql下载地址https://downloads.mysql.com/archives/community/

    2.设置配置文件

    2.1 新建my.ini文件设置文件内容如下

    [mysqld]
    #设置时区为东八区,此项设置后,在连接MySQL的时候可以不用每次都手动设置时区
    default-time-zone = '+8:00'
    # 设置3306端口
    port=3306
    # 设置mysql的安装目录
    basedir=D:appmysql8
    # 设置mysql数据库的数据的存放目录
    datadir=D:appmysql8data
    # 允许最大连接数
    max_connections=200
    # 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
    max_connect_errors=10
    # 服务端使用的字符集默认为utf8mb4
    character-set-server=utf8mb4
    # 创建新表时将使用的默认存储引擎
    default-storage-engine=INNODB
    # 默认使用“mysql_native_password”插件认证
    default_authentication_plugin=mysql_native_password
    [mysql]
    # 设置mysql客户端默认字符集
    default-character-set=utf8mb4
    [client]
    # 设置mysql客户端连接服务端时默认使用的端口
    port=3306
    

    3.安装mysql

    3.1 切换到bin目录

    C:Windowssystem32>cd d:
    D:
    
    C:Windowssystem32>d:
    
    D:>cd app
    
    D:app>cd mysql8
    
    D:appmysql8>cd bin
    

    3.2 初始化mysql

    mysqld --initialize --console
    

    初始化完成后会生成一个随机密码

    D:appmysql8in>mysqld --initialize --console
    2021-02-25T15:48:45.282852Z 0 [System] [MY-013169] [Server] D:appmysql8inmysqld.exe (mysqld 8.0.22) initializing of server in progress as process 5968
    2021-02-25T15:48:45.292098Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
    2021-02-25T15:48:45.800039Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
    2021-02-25T15:48:46.606846Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 8)ZoGijNK40R
    

    4.安装mysql

    D:appmysql8in>mysqld --install
    Service successfully installed.
    

    5.启动mysql

    D:appmysql8in>net start mysql
    MySQL 服务正在启动 .
    MySQL 服务已经启动成功。
    

    6.登录数据库

    D:appmysql8in>mysql -u root -p
    Enter password: ************
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 8
    Server version: 8.0.22
    
    Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
    
    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.
    

    7.修改root密码

    mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY  '123456'
        -> ;
    Query OK, 0 rows affected (0.01 sec)
    
    mysql>
    
  • 相关阅读:
    struts2 <s:iterator> 遍历方法
    JSP 基础之 JSTL <c:forEach>用法
    struts2 中 Session的使用简介
    Struts2 工作流程
    Aandroid Error之 新导入工程报Unable to resolve target 'android-18'和R cannot be resolved
    纯Html+Ajax和JSP两者对比的个人理解
    移动互联网App兼容性测试
    【转】【Mac】invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library
    【转】Mac使用apt-get
    有趣网址之家 – 收藏全球最有趣的网站
  • 原文地址:https://www.cnblogs.com/vicosong/p/14772481.html
Copyright © 2011-2022 走看看