配置my.ini文件

[client]
port=3306
default-character-set=utf8
[mysqld]
# 设置为自己MYSQL的安装目录
basedir=D:\Program Files\MySQL\MySQL Server 5.7-3306
# 设置为MYSQL的数据目录
datadir=D:\Program Files\MySQL\MySQL Server 5.7-3306\data
#设置3306端口
port=3306
# 服务端使用的字符集默认为8比特编码的latin1字符集
character_set_server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#开启查询缓存
explicit_defaults_for_timestamp=true
skip-grant-tables

在dos命令下进入mysql的bin目录 ,执行

mysqld --install mysqld_3306 (重命名服务名是为了方便多实例安装)

mysqld --initialize

密码在后缀名为err的文件中

--02T12::.832824Z  [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
--02T12::.832824Z [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
--02T12::.782828Z [Warning] InnoDB: New log files created, LSN=
--02T12::.344429Z [Warning] InnoDB: Creating foreign key constraint system tables.
--02T12::.531629Z [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 40ec5e78-cd7f-11e9-be0a-7c7a911e77d7.
--02T12::.578429Z [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
--02T12::.609629Z [Note] A temporary password is generated for root@localhost: xgylo1yich+V
--02T12::.978088Z [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
--02T12::.978088Z [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
--02T12::.978088Z [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
--02T12::.978088Z [Note] mysqld_3306 (mysqld 5.7.) starting as process ...
--02T12::.993688Z [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
--02T12::.993688Z [Note] InnoDB: Uses event mutexes
--02T12::.993688Z [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
--02T12::.993688Z [Note] InnoDB: Compressed tables use zlib 1.2.
--02T12::.993688Z [Note] InnoDB: Number of pools:
--02T12::.993688Z [Note] InnoDB: Not using CPU crc32 instructions
--02T12::.993688Z [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = , chunk size = 128M
--02T

mysql 8.0.15 安装步骤有点差异 初始化使用

mysqld --initialize  --console

密码会在控制台打印出来

首次登录需要修改密码,不然使用navicat会提示密码过期

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

  

最新文章

  1. JavaScript线程机制
  2. (原创)ssm sql 例子(freemarker+jsp)
  3. 区分苹果Safari浏览器
  4. 手把手教你调试Linux C++ 代码(一步到位包含静态库和动态库调试)
  5. 50款免费 PSD 名片设计模板源文件下载《下篇》
  6. CVE-2014-0050: Exploit with Boundaries, Loops without Boundaries、Apache Commons FileUpload and Apache Tomcat DoS
  7. [AngularJS] 常用指令
  8. 在微信中实现app软件中账号注册的功能实现
  9. [转]jexus的安装
  10. WINRAR评估版本弹出框消除
  11. Python闭包与函数对象
  12. Pip 安装 出现UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-5: ordinal not in
  13. php 过滤emoji表情
  14. mysql 安装-zip版
  15. VPS搭建离线下载服务器——后网盘时代
  16. Flutter控制屏幕旋转
  17. 海洋cms v6.53 v6.54版本漏洞复现
  18. 第十六单元 yum管理RPM包
  19. 为docker私有registry配置nginx反向代理
  20. tmux 复制粘贴

热门文章

  1. Class-SP:Order.cs
  2. JAVA获取树形结构
  3. error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
  4. dotnet core 项目脚手架这种小事嘛...
  5. Spring BeanFactory 初始化 和 Bean 生命周期
  6. oracle 解决 exp 空表不能导出的问题
  7. 快速修改Windows系统密码命令
  8. [Mobi] cordova requirements,Exception in thread "main" java.lang.NoClassDefFoundError
  9. linux减少服务器带宽的方法
  10. 宝塔linux定时任务设置