首页 技术 正文
技术 2022年11月11日
0 收藏 466 点赞 3,464 浏览 1515 个字

windows安装mysql示例

1. 下载mysql安装包,如: mysql-5.6.34-winx64.zip
2. 解压安装包到指定目录,如:D盘,即:D:\mysql-5.6.34-winx64
3. 配置

cd D:\mysql-5.6.34-winx64
cp my-default.ini my.ini # windows下mysql配置文件名称为: my.ini
vim my.ini

my.ini配置示例:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/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 = D:\\mysql-5.6.34-winx64
datadir = D:\\mysql-5.6.34-winx64\\data # 当数据目录不在安装目录下时,需要先将mysql默认数据目录下的内容拷贝到相应目录,并明确配置该参数
# 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

详见mysql5.6安装示例:https://dev.mysql.com/doc/refman/5.6/en/windows-install-archive.html

4.启动
在windows控制台,执行:D:\mysql-5.6.34-winx64\bin\mysqld –console 即可启动mysql服务。

5.停止

在windows控制台,执行:D:\mysql-5.6.34-winx64\bin\mysqladmin -uroot shutdown 停止mysql服务,

不同版本的MySQL在安装时存在一些细微的差别,例如:从5.7版本开始默认不会在安装路径下自带data目录,详细步骤请参考官方文档:https://dev.mysql.com/doc/  。

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,085
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,560
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,409
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,182
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,819
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,902