mysql 5.7 windows zip安装

  1. mysql 官网下载windows zip 安装包 并解压 (D:wampmysql-56-winx64)
  2. 添加path D:wampmysql-5722-winx64bin
  3. 创建data目录 D:\wamp\mysql-56-winx64\data
  4. 创建mysql 配置文件 D:wampmysql-56-winx64my.ini

       [mysqld]
       # set basedir to your installation path
       basedir=D:\\wamp\\mysql-56-winx64
       # set datadir to the location of your data directory
       datadir=D:\\wamp\\mysql-56-winx64\\data
       
  5. cmd 执行 mysqld –initialize (初始化)
  6. 执行 mysqld –install mysql57 –defaults-file= D:wampmysql-56-winx64my.ini
    (安装到windows 服务 mysqld –remove mysql57 移除服务 )
  7. 查看安装日志文件 D:wampmysql-5722-winx64dataMY-HOME.err 找到

     **A temporary password is generated for root@localhost:** 
      后面是你的密码

8.mysql -uroot -p上面查到的密码
进入数据库

  1. SET PASSWORD FOR ’root’@’localhost’= ”123456″; –更新你的mysql 密码 
    原文作者:missonce
    原文地址: https://segmentfault.com/a/1190000015557762
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞