绿色版的mysql 下载安装配置方式

本文介绍如何安装配置 MySQL 5.6.26 绿色版,包括解压压缩包、配置 my.ini 文件、设置环境变量及安装服务等步骤,并提供了修改初始密码的方法。

解压下载好的压缩包

下载地址 mysql-5.6.26-win64 绿色版

copy 一份my-default.ini改名字为my.ini为mysql的配置文件

打开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.
# basedir = .....
# datadir = .....
# port = .....
# 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 

修改为(黄色高亮部分)

# 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.
basedir = "C:\work\mysql-5.6.26-winx64\mysql-5.6.26-winx64"
datadir = "C:\work\mysql-5.6.26-winx64\mysql-5.6.26-winx64\data"
# port = .....
# 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 
#服务端的编码方式
character-set-server=utf8
[client]
#客户端编码方式,最好和服务端保存一致
loose-default-character-set = utf8
 
[WinMySQLadmin]  
Server = "C:\work\mysql-5.6.26-winx64\mysql-5.6.26-winx64\bin\mysqld.exe"

修改好配置文件之后

配置环境变量

在path中添加mysql的安装bin目录就好了 (这步骤最好先做)

以管理员身份运行cmd 进入mysql安装的bin的文件夹中,

输入 mysqld -install 运行安装服务 运行成功之后 开启服务,

再次运行cmd 输入mysql -u root -p 密码默认没有 检测是否安装成功

安装成功之后 修改密码 同理以管理员身份运行cmd 进入mysql安装的bin的文件夹中 

输入mysqladmin -u root -p password 回车 

输入原始密码 再次输入新密码 确认密码 (原始密码初次登陆为空 直接回车就行了)

 

大功告成

转载于:https://www.cnblogs.com/Pikzas/p/5459065.html

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值