Mysql应用MySql 5.7.17免安装配置教程详解

前端之家收集整理的这篇文章主要介绍了Mysql应用MySql 5.7.17免安装配置教程详解前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

MysqL应用MysqL 5.7.17免安装配置教程详解》要点:
本文介绍了MysqL应用MysqL 5.7.17免安装配置教程详解,希望对您有用。如果有疑问,可以联系我们。

MysqL应用1、下载MysqL-5.7.17-winx64.zip安装包(链接:https://dev.MysqL.com/downloads/MysqL/)

MysqL应用2、解压安装包.

MysqL应用D:\DevelopTool\MysqL-5.7.17-winx64   #解压目录

MysqL应用3、在解压目录下创建一个名为data的文件夹,用来存放数据

MysqL应用D:\DevelopTool\MysqL-5.7.17-winx64\data

MysqL应用4、配置启动文件

MysqL应用  把 D:\DevelopTool\MysqL-5.7.17-winx64\my-default.ini 文件copy一份,重新命名为 my.ini,修改里面的参数,如下:

MysqL应用
# 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. It's 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 为安装文件解压后的目录 | basedir和datadir 可以使用相对路径
# basedir=./..
basedir=D:\\DevelopTool\\MysqL-5.7.11-winx64
# datadir 为用来存放数据的目录
# datadir=./../data
datadir=D:\\DevelopTool\\MysqL-5.7.11-winx64\\data
# port 为端口号
port=3306
# mar_connections为最大连接数
max_connections=20
character_set_server=utf8
# 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 
explicit_defaults_for_timestamp=true
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

MysqL应用 5、初始化数据目录

MysqL应用
MysqLd --defaults-file="D:\DevelopTool\MysqL-5.7.17-winx64\my.ini" --initialize-insecure

MysqL应用它会初始化 data 目录,在执行此命令前请先把data目录下的所有文件删除,否则会失败

MysqL应用可以选择用 --initialize-insecure 或者 --initialize 来初始化,--initialize-insecure 初始化root密码为空,如果用 --initialize来初始化,会产生一个随机密码

MysqL应用  执行成功后,在data目录下会生成MysqL,perofrmance_schema,sys等目录文件

MysqL应用6、安装和启动MysqL服务

MysqL应用
#安装服务
MysqLd -install
#启动服务
net start MysqL
#进入MysqL
MysqL -u root -p
#移除MysqL
MysqLd -remove

MysqL应用关于本站给大家提供的MysqL专题大家可以参考下:

MysqL应用MysqL在各个系统的安装教程

MysqL应用MysqL Root密码操作技巧

MysqL应用MysqL数据库入门教程

MysqL应用MysqL中的数据库操作知识汇总

MysqL应用以上所述是小编给大家介绍的MysqL 5.7.17免安装配置教程详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的.在此也非常感谢大家对编程之家PHP网站的支持!

猜你在找的MySQL相关文章