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

解压下载好的压缩包

下载地址 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 回车

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

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

大功告成

上一篇:使用 python 开发 Web Service


下一篇:eclipse环境搭建