首页 > 数据库技术 > 详细

windows mysql绿色版配置Mysql5.7.X

时间:2019-10-10 00:35:44      阅读:95      评论:0      收藏:0      [点我收藏+]

MySQL绿色版安装,很简单按照下面的方式很快就可以实现了。

1.下载地址

https://dev.mysql.com/downloads/mysql/   

百度网盘链接:https://pan.baidu.com/s/1ieuZsB095CnH61cEBa6Hxg 提取码:1k08

2.配置my.ini 文件

解压下载文件到指定目录。如:      

技术分享图片

my.ini文件内容:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. Its 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]

# 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 = .....
basedir=D:\DEVELOPERS\mysql-5.7.9-winx64
datadir=D:\DEVELOPERS\mysql-5.7.9-winx64\data
port=3306
max_connections=500
character-set-server=utf8
default-storage-engine=INNODB
server_id=1

# 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.执行安装mysql   

cmd命令令行进入文件目录: 

技术分享图片

 

 

执行mysqld install 命令,出现如下提示,安装成功。 

技术分享图片

 

 Service sucessfully installed.

注: 如出现 Install/Remove of the Service Denied 请使用管理员启动命令行。

4.初始化数据库   

执行 mysqld --initialize   命令没有输出提示。

技术分享图片

root 密码初始化在data文件夹 *.err 文件中:   

技术分享图片

 

 

5.启动mysql服务   

执行 net start mysql   

技术分享图片

 

 

 

注:启动mysql服务可以在任意路径下,必须以管理员方式运行的命令行。

 

6.进入mysql 

执行 mysql -u root -p #注:这个命令只能在mysql的bin文件路径下执行。   

技术分享图片

 

 

输入密码,进入系统。   

7.修改root密码 

执行 set password for root@localhost = password(‘123456‘);   

技术分享图片

8.添加环境变量(可选)   

技术分享图片

 进入数据库查看数据库实例:

技术分享图片

 

 

 参考文章:https://www.cnblogs.com/Springmoon-venn/p/6849715.html

windows mysql绿色版配置Mysql5.7.X

原文:https://www.cnblogs.com/boonya/p/11645180.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!