一、下载MySQL
二、安装MySQL
将压缩包解压到c:\目录下,并且命名为mysql5.7;盘符可以根据自己的意愿安装,如:e:/mysql5.7 D:/mysql5.7
复制my-default.ini,并且重新命名为my.ini;
my.ini 配置如下
[mysql]
default-character-set=utf8 第一步复制
[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:\mysql5.7 第二步需要复制的(注意路径不能写错,如果你安装D: E: 就把C:/ 改过来)
datadir = c:\mysql5.7\data
port = 3306
max_connections = 200
character-set-server = utf8
default-storage-engine = INNODB
接下来启动windows命令行,并且切换到c:\mysql5.7\bin子目录,然后输入
这样的话,就可以将MySQL安装成为Windows操作系统的一种服务了
然后再输入: 这是初始化数据 默认用户root 密码为空
执行完上述命令,MySQL自动创建data文件夹,并且建好默认数据库
最后输入 net start mysql 启动服务;
登录MySQL
mysql -uroot -p
注意:如果安装失败了,就删除服务,重新安装一遍
删除MySQL服务命令: sc delete mysql service
标签:set,windows,安装,MySQL5.7,MySQL,mysql5.7,mysql,data,数据库
来源: https://blog.csdn.net/mogexiuluo/article/details/110978742