zoukankan      html  css  js  c++  java
  • win10 安装mysql zip 压缩包版

    从官网下载zip https://www.mysql.com/downloads/

    解压 

     D:devtoolmysql-5.7.17-winx64

    将  D:devtoolmysql-5.7.17-winx64in  加入环境变量

    在任务栏 windows图标上右键->命令提示符(管理员), 以管理员身份运行 cmd , cd 到D:devtoolmysql-5.7.17-winx64in。 不以管理员运行会出现权限不够被拒绝

    依次运行以下三条命令

    mysqld --initialize-insecure

    会自动在 D:devtoolmysql-5.7.17-winx64 下创建data目录,不必手工创建data目录

    mysqld -install

     这步是安装 mysql 服务, 如果不是管理员运行会提示 “Install/Remove of the Service Denied!” , 如果不cd到 mysql的bin目录 服务安装后路径默认在 C:Program FilesMySQL , 启动服务会失败 提示 “

    发生系统错误 2。 系统找不到指定的文件”

    而删除 mysql 服务是

    mysqld -remove
    net start mysql

    这步是启动mysql 服务, 如果没有第一步 这步会启动失败 并提示 “请键入 NET HELPMSG 3534 以获得更多的帮助”

    启动mysql以后就可以 在cmd 中 输入 mysql -u root -p  enter 完成初次登陆了

     1 Welcome to the MySQL monitor.  Commands end with ; or g.
     2 Your MySQL connection id is 7
     3 Server version: 5.7.17
     4 
     5 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
     6 
     7 Oracle is a registered trademark of Oracle Corporation and/or its
     8 affiliates. Other names may be trademarks of their respective
     9 owners.
    10 
    11 Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    12 
    13 mysql>

    参考资料

    从MySQL5.7.6开始,安装MySQL提示“请键入 NET HELPMSG 3534 以获得更多的帮助”的解决办法

    MySQL 5.6 for Windows 解压缩版配置安装_百度经验

    补充资料 :

    启动mysql以后就可以 在cmd 中 输入 mysql -u root -p  enter初次登陆了,按照以前的一些文章来看初始密码为空但是直接enter后出现“ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)”  搜索后 MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因 - 潇湘隐者 - 博客园  这篇文章是Linux上的,但是提到生成了一个随机密码, 直接告诉我可能在自动生成的data目录里能发现什么, 打开其中 “计算机名.err”的文件 (计算机名根据实际情况不同,不是本身这几个字) 搜索password 果然搜到, 尝试那个密码成功

    可以选择用 --initialize-insecure 或者 --initialize 来初始化,--initialize-insecure 初始化root密码为空,如果用 --initialize来初始化,会产生一个随机密码 

    ——摘自 mysql 5.7.11 zip 安装 - happymzw

     

    官方文档上有:https://dev.mysql.com/doc/refman/5.7/en/windows-initialize-data-directory.html 

    https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html

  • 相关阅读:
    Apache httponly Cookie泄露

    shell脚本
    Linux与windows的文件系统结构
    使用rsync进行远程同步
    电子邮件服务
    httpd虚拟主机
    Enpass 基于 Mezzanine
    powershell: 生成随机字符串
    thinkPHP5.x 更新字段为 NULL
  • 原文地址:https://www.cnblogs.com/lonkiss/p/6516700.html
Copyright © 2011-2022 走看看