您的位置:首页 > 数据库 > MySQL

win 下mysql的安装

2016-03-29 00:00 567 查看
1,环境变量。

2,ini文件修改

[mysql]

default-character-set=utf8

# 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]

character-set-server=utf8

basedir=D:\mysql-5.6.24-win32

datadir=D:\mysql-5.6.24-win32\data

# 允许最大连接数

max_connections = 200

# 设置字符集为utf8

loose-default-character-set = utf8

#bind-address = 0.0.0.0

# 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

3,

bin 进入mysql的bin文件夹(不管有没有配置过环境变量,也要进入bin文件夹,否则之后启动服务仍然会报错误2)
输入mysqld -install
4,修改密码:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');

密码加密:

select password('你想输入的密码');
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: