windows 安装 MySQL 绿色版

windows 安装 MySQL 绿色版

下载

官网:


MySQL下载页面:
windows 安装 MySQL 绿色版_第1张图片
windows 安装 MySQL 绿色版_第2张图片
windows 安装 MySQL 绿色版_第3张图片

windows 安装 MySQL 绿色版_第4张图片
windows 安装 MySQL 绿色版_第5张图片
MySQL直接下载链接:https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip

安装

  1. 将下载的mysql.zip文件解压缩到指定目录

  2. 搜索 cmd 并以管理员身份运行

  3. 切换到mysql安装目录
    windows 安装 MySQL 绿色版_第6张图片

  4. 初始化mysql 参数

    mysqld.exe --initialize --console
    
  5. mysql注册为系统服务

    mysqld.exe -install
    
  6. 启动mysql服务

    net start mysql
    
  7. 使用mysql 命令行登录MySQL

    mysql.exe -uroot -p
    

    windows 安装 MySQL 绿色版_第7张图片

  8. 修改密码

    ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
    flush privileges;
    
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
    flush privileges;
    
    update mysql.user set host = '%',plugin='mysql_native_password' where user='root';
    flush privileges;
    
    quit;
    
  9. 重启mysql服务

    net stop mysql
    
    net start mysql
    
  10. 设置环境变量

    键盘 win + r 系统左下角弹出运行窗口

    windows 安装 MySQL 绿色版_第8张图片
    windows 安装 MySQL 绿色版_第9张图片

运行窗口 输入 sysdm.cml

windows 安装 MySQL 绿色版_第10张图片

windows 安装 MySQL 绿色版_第11张图片

windows 安装 MySQL 绿色版_第12张图片
windows 安装 MySQL 绿色版_第13张图片
windows 安装 MySQL 绿色版_第14张图片
windows 安装 MySQL 绿色版_第15张图片
windows 安装 MySQL 绿色版_第16张图片
windows 安装 MySQL 绿色版_第17张图片

你可能感兴趣的:(数据库,mysql,mysql,数据库)