码迷,mamicode.com
首页 > 数据库 > 详细

绿色版的mysql安装配置方式

时间:2016-05-04 18:52:31      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:

解压下载好的压缩包

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"

修改好配置文件之后,以管理员身份运行cmd 进入mysql安装的bin的文件夹中,输入 mysqld -install 运行安装服务 运行成功之后 开启服务

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

安装成功之后 修改密码 同理以管理员身份运行cmd 进入mysql安装的bin的文件夹中 输入mysqladmin -u root -p password 回车 

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

技术分享

配置环境变量

在path中添加mysql的安装bin目录就好了

大功告成

绿色版的mysql安装配置方式

标签:

原文地址:http://www.cnblogs.com/Pikzas/p/5459065.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!