MySQL下载

搜狐镜像下载
http://mirrors.sohu.com/mysql/MySQL-5.7/
清华大学镜像站
https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.7/

配置文件

  1. [mysqld]
  2. basedir=D:\web\mysql-5.7\
  3. datadir=D:\web\mysql-5.7\data\
  4. port=3306
  5. skip-grant-tables
  6. # my.ini

命令行

  1. mysqld --install
  2. @echo 用于安装mysql
  1. mysqld --initialize-insecure --user=mysql
  2. 初始化数据文件
  1. mysql u root p
  2. 进入mysql服务
  1. update mysql.user set authentication_string=password('pwd123456') where user='root' and Host = 'localhost';
  1. flush privileges;
  1. net stop mysql
  2. net start mysql