包括功能:

端口,是否启用bin log , 指定目录, InnoDB是否启用压缩,MySQL使用旧的密码验证方式.

说明,建表的时候要添加必要的参数才会启用表数据压缩存储,以下为例:

CREATE TABLE `win008` (
`id` int(11) DEFAULT NULL,
`name` char(50) DEFAULT NULL,
`note` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4

关于初始化安装,请参考 http://www.cnblogs.com/laumians-notes/p/9069498.html 不再累赘 .

[mysqld]
#是否启用bin log
skip-log-bin # 设置3306端口
port=
# 设置mysql的安装目录
basedir=D:\\webserver\\mysql\\mysql-8.0.-winx64
# 切记此处一定要用双斜杠\\,单斜杠我这里会出错
# 设置mysql数据库的数据的存放目录
datadir=D:\\webserver\\mysql\\data\\mysql8
# 允许最大连接数
max_connections=
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=
# 服务端使用的字符集默认为UTF8
character-set-server=utf8mb4 # 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password #InnoDB#
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
innodb_buffer_pool_size=2G
#innodb_additional_pool_size=20M
innodb_log_file_size=256M
innodb_log_buffer_size=12M
innodb_flush_log_at_trx_commit=
#innodb_flush_method
#thread_cache=
#innodb_autoextend_increment=128M #这里确认是否起用压缩存储功能
innodb_file_per_table=
#innodb_file_format=barracuda #mysql 不支持该功能
#决定压缩程度的参数,如果你设置比较大,那么压缩比较多,耗费的CPU资源也较多;
#相反,如果设置较小的值,那么CPU占用少。默认值6,可以设置0-#
innodb_compression_level=
#指定在每个压缩页面可以作为空闲空间的最大比例,
#该参数仅仅应用在设置了innodb_compression_failure_threshold_pct不为零情况下,并且压缩失败率通过了中断点。
#默认值50,可以设置范围是0到75
innodb_compression_pad_pct_max= [mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=
default-character-set=utf8

接下来初始化数据环境:

mysqld --initialize --user=mysql --console

大概会得到如下结果:

C:\Users\Administrator>mysqld --initialize --user=mysql --console

--20T14::.854709Z  [System] [MY-] [Server] C:\mysql-8.0.-winx
\bin\mysqld.exe (mysqld 8.0.) initializing of server in progress as process --20T14::.645099Z [Note] [MY-] [Server] A temporary password i
s generated for root@localhost: F-/Yn%lhd3,K
--20T14::.641728Z [System] [MY-] [Server] C:\mysql-8.0.-winx
\bin\mysqld.exe (mysqld 8.0.) initializing of server has completed

从中可以得到初始化数据的root的密码,接下来继续安装和启动服务:

C:\Users\Administrator>mysqld --install
Service successfully installed. C:\Users\Administrator>net start mysql
MySQL 服务正在启动 ....
MySQL 服务已经启动成功。

登录并修改原始密码:

C:\Users\Administrator>mysql -uroot -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 8.0. Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ALTER USER "root"@"localhost" IDENTIFIED BY "";
Query OK, rows affected (0.40 sec) mysql> flush privileges;
Query OK, rows affected (0.00 sec)

最新文章

  1. Google分布式构建软件之一:获取源代码
  2. [SDK2.2]SQL Azure (13) Azure的两种关系型数据库服务:SQL Azure与SQL Server VM的不同
  3. java 环境配置 及java 历史
  4. Javascript模块化编程笔记
  5. 如何在sharepoint2010中配置Google Anlytics 分析服务
  6. Droid4x安装busybox
  7. Android 在广播接收器中弹出对话框
  8. Python新手学习基础之初识python——与众不同2
  9. HDU4536 XCOM Enemy Unknown(dfs)
  10. Activity的onSaveInstanceState()和onRestoreInstanceState()方法
  11. [Android] 文件夹下文件的个数限制
  12. 水题 第三站 HDU Largest prime factor
  13. 第一篇:Win10系统搭建Python+Django+Nginx+MySQL 开发环境详解(完美版)
  14. Navi.Soft31.产品.微信聊天(永久免费)
  15. Python 学习笔记(一)Python 简介
  16. 201621123068 《Java程序设计》第1周学习总结
  17. 第三次 orm自动建表及遇到的问题
  18. vue项目使用 prerender-spa-plugin 预渲染
  19. 增强for、iterator迭代器
  20. Tornado创建一个web服务

热门文章

  1. 棋盘游戏,dfs搜索
  2. ASP.Net Core "The type initializer for 'Gdip' threw an exception"
  3. volatile CAS区别
  4. c++的一些入门
  5. 记字符串转bigDecimal的一个坑
  6. Axure RP 9 Mac正式汉化版安装教程
  7. 【模板】ST表
  8. 【题解】Luogu P5284 [十二省联考2019]字符串问题
  9. 【Alpha】Scrum Meeting 9
  10. 湖南省队集训 Day 2