1,环境变量。
html
2,ini文件修改mysql
[mysql]sql
default-character-set=utf8ui
# For advice on how to change settings please see加密
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.htmlspa
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to theorm
# *** default location during install, and will be replaced if youserver
# *** upgrade to a newer version of MySQL.htm
[mysqld]rem
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('你想输入的密码');