安装

1.下载安装包

2.解压包

 3.文件夹内创建my.ini配置文件,并添加内容

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin # These are commonly set, remove the # and set as required.
# 设置mysql的安装目录
basedir = D:\\MySQL\\mysql1
# 设置mysql数据库的数据的存放目录
datadir = D:\\MySQL\\mysql1\\data
# 设置3306端口
port = 3306
# server_id = ..... # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES # 允许最大连接数
max_connections = 200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors = 10
# 服务端使用的字符集默认为UTF8
character-set-server = utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine = INNODB
[mysql]
# 设置mysql客户端默认字符集
default-character-set = utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set = utf8mb4

 4.使用cmd管理员模式进入mysql的bin目录下

cd D:\MySQL\mysql1\bin

 5.执行数据库初始化

mysqld --initialize --console

@localhost:密码

这个密码一定要记住

6.运行安装服务

mysqld.exe -install

如果需要改服务名的话
mysqld.exe -install MySQL2

7.运行

net start mysql

但是目前只能通过localhost也就是本机登录

继续cmd管理员模式进入安装目录的bin文件下

登录mysql

mysql -u root -p

输入刚刚保存的密码(这里只能手打不能粘贴)

此时已进入到mysql里面

选择数据库

use mysql

更改user表中的host,把localhost改为%

update user set host='%' where user='root';

 刷新权限

flush privileges;

 修改mysql登录密码(需要先登录)

alter user'root'@'localhost' identified with mysql_native_password by '你的密码';


mysql -u root -p

windows 安装mysql 非常之详细的更多相关文章

  1. windows 安装mysql 步骤

    Windows 安装mysql 5.7.12教程 1.在官网下载mysql5.7.12.zip并解压 复制默认配置文件my-default.ini,并命名为my.ini 使用记事本打开,修改如下配置 ...

  2. windows 安装 MySQL

    windows 安装 MySQL MySQL 目录结构 成功完成 MySQL 数据库的安装和配置!

  3. windows安装mysql示例

    1. 下载mysql安装包,如: mysql-5.6.34-winx64.zip2. 解压安装包到指定目录,如:D盘,即:D:\mysql-5.6.34-winx643. 配置 cd D:\mysql ...

  4. windows 安装MySql

    转载:http://blog.csdn.net/longyuhome/article/details/7913375 Win7系统安装MySQL5.5.21图解 大家都知道MySQL是一款中.小型关系 ...

  5. windows10上安装mysql(详细步骤)

    2016年09月06日 08:09:34 阅读数:46198 环境:windwos 10(1511) 64bit.mysql 5.7.14 时间:2016年9月5日 一.下载mysql 1. 在浏览器 ...

  6. 阿里云服务器上安装mysql的详细步骤

    阿里云安装mysql (1)下载mysql安装包,去mysql官网下载对应的包 mysql数据库官方下载网址:   https://downloads.mysql.com/archives/commu ...

  7. Windows安装MySQL免安装版

    安装环境: win7 64位 IP地址:192.168.2.37 防火墙已经关闭 一.安装MySQL5.7.14免安装版 1.解压文件 2.新建my.ini文件 data文件夹自动生成 my.ini里 ...

  8. Windows安装MySQL解压版

    1:解压 2:设置环境变量 3:修改my.ini [mysqld] basedir = D:\MySQL\Server\mysql--win32 datadir = D:\MySQL\Server\d ...

  9. windows安装mysql教程2017最新

    1.首先在mysql官网下载最新版mysql, 附上链接点击打开链接,根据你的系统型号选择对应的包下载,大约300多兆,版本号为5.7.19 下载完之后,解压缩,是一个标准的mysql文件 2.第二步 ...

  10. centOS下安装mysql workbench详细步骤

    step0:安装mysql 在按照workbench之前,先安装mysql.指令是 yum install mysql mysql-server mysql-libs mysql-server 关于m ...

随机推荐

  1. [GPT] 提高个人网站的访问量的 30 种详细方式

    内容优化:提高网站的质量和价值,让用户喜欢并分享你的内容. SEO优化:通过关键词优化.网站结构优化等方式,提高搜索引擎排名. 社交媒体:在社交媒体上分享你的内容,吸引更多人来访问你的网站. 广告投放 ...

  2. 2018-6-30-dotnet-设计规范-·-抽象类

    title author date CreateTime categories dotnet 设计规范 · 抽象类 lindexi 2018-6-30 9:2:38 +0800 2018-06-30 ...

  3. 2018-4-15-WPF-在-Alt+Tab-隐藏窗口

    title author date CreateTime categories WPF 在 Alt+Tab 隐藏窗口 lindexi 2018-04-15 10:13:40 +0800 2018-3- ...

  4. Git的操作使用

    Git结构: # 工作区:当前编辑的区域 # 缓存区:add之后的区域 # 本地仓库:commit之后的区域 # 远程仓库:GitHub,gitlab,码云... 一.Git的初步认识 一.Git是什 ...

  5. 登录信息localStorage存储

    localStorage拓展了cookie的4K限制,与sessionStorage的唯一一点区别就是localStorage属于永久性存储,而sessionStorage属于当会话结束的时候,ses ...

  6. Oracle和达梦:获取表是否被锁定

    1.获取表是否被锁定 select "V$SESSIONS".SESS_ID,"V$SESSIONS".SQL_TEXT,"V$SESSIONS&qu ...

  7. Linux中的which whereis locate

    which which会在PATH环境中搜寻可执行文件 whereis Linux会将系统里面所有的文件都搜集到一个数据库文件中,whereis从这个数据库文件里面寻找文件 locate locate ...

  8. 1分钟了解什么是SQL聚合函数,一看就懂,一学就会!(AVG(column_name)\COUNT(column_name)\MAX(column_name)\MIN(column_name)\SUM(column_name))

    聚集函数:SQL基本函数,聚集函数对一组值执行计算,并返回单个值,也被称为组函数.聚集函数经常与SELECT语句的GROUP BY子句的HAVING一同使用.但是不可用于WHERE语句中,因为WHER ...

  9. C语言:水仙花

    //水仙花数 也就是指一个 3 位数,它的每个单位上的数字的 3次方之和等于它本身 (例如:1^3 + 5^3+ 3^3 = 153). #include<stdio.h> int mai ...

  10. AIRIOT答疑第7期|如何快速提升物联网项目交付速度?

    平台+模板,套上就能用!贼拉快! AIRIOT提供物联网低代码平台+多套行业案例模板,针对于有明确项目的服务商,用平台已经配置好的节点数.功能模块.流程,直接上手干项目! AIRIOT解答: 多套物联 ...