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

mysql 5.7.17 绿色版安装配置

2017-01-06 19:38 316 查看
新下载了个MySql。启动报错“mysql 服务无法启动 服务没报告任何错误”

最新版本的安装方式

1.下载解压到C:\mysql目录

2.修改default.ini为my.ini,并配置以下内容

[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:\mysql

datadir = C:\mysql\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

3.将C:\mysql\bin 加入到环境变量

4.mysqld --initialize-insecure 初始化一个空密码的root用户(创建了data文件夹)

5.mysqld --install MySQL --defaults-file="C:\MySql\my.ini"   安装mysql服务到系统

6.net start mysql

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql 绿色