MySQL5.7.27安装
1、下载 https://dev.mysql.com/downloads/mysql/5.7.html#downloads 按照自己电脑位数下载相应安装包
2、安装
2.1 解压到想要安装的目录
例如我解压到如下位置 E:\mysql-5.7.27
2.2 新建一个my.ini 。位置与bin目录同级。
编辑该my.ini文件并输入以下内容:
[client]
port=8888
[mysql]
default-character-set=utf8
[mysqld]
#skip-grant-tables
port=8888
bind-address=0.0.0.0
character-set-server=gbk
#解压目录
basedir=E:\mysql-5.7.27
#解压目录下data目录
datadir=E:\mysql-5.7.27\data
default-storage-engine=INNODB
#sql-mode=“STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
sql-mode=“STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION”
max_connections=120
query_cache_size=16M
tmp_table_size=45M
thread_cache_size=8
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=64M
key_buffer_size=32M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=3498K
innodb_buffer_pool_size=400M
innodb_log_file_size=175M
innodb_thread_concurrency=8
max_allowed_packet = 8M
event_scheduler = on
group_concat_max_len = 2048
performance_schema = off
innodb_file_per_table = 1
server-id=1
2.3 配置环境变量
1)右键单击我的电脑->属性->高级系统设置(高级)->环境变量
点击【系统变量】下的新建按钮