MySQL:MySQL5.7.21安装教程
程序员文章站
2024-03-18 10:08:40
...
MySQL5.7 64位 zip文件安装教程
- 到官网下载MySQL5.7.zip。
- 将解压后的bin目录添加到环境变量的Path中。
- 在MySQL根目录创建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的缓存,可以根据实际情况调整大小,我这里采取默认值
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.
#mysql根目录
basedir = G:\MySQL\mysql-5.7.27-winx64
#数据存储目录
datadir = G:\MySQL\mysql-5.7.27-winx64\data
#端口号,默认为3306
port = 3306
#服务实例的唯一标识,这个是做集群的时候使用,单例可以不配置
# 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
#配置一下服务端的字符集
character_set_server=utf8mb4
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#配置一下客户端的字符集
[client]
default-character-set=utf8mb4
-
以管理员身份运行cmd,输入命令“mysqld --initialize-insecure --user=mysql”;该命令会在MySQL根目录下创建名为data的文件夹。
-
mysqld –install MySQL5.7 # install后面是服务名, 这里以MySQL5.7作为mysql5.7的服务名。
-
通过“Cortana”打开“服务”。
-
找到MySQL5.7,并启动。
-
通过“mysql -uroot -P3306 -p”启动MySQL。
-
密码通过data文件夹下生成的后缀为.err的文件中找,
- 即可。
推荐阅读
-
MySQL:MySQL5.7.21安装教程
-
MacBook Pro 下mysql 的安装与使用
-
结合官方说明 CeontOS7 编译(源码)安装Mysql 5.7.28
-
BBR安装教程 一键安装脚本 BBR/魔改/暴力/BBRplus/锐速(Lotsever)
-
mysql 解压版 安装步骤详情,本人亲测
-
MySQL 8.0.19安装教程(windows 64位)
-
最新版MySQL 8.0.19Windows64位安装教程(亲测可行)
-
windows64位下安装mysql
-
Windows64位 TimescaleDb+PostGresql12安装教程
-
MySQL 8.0.19安装教程(windows 64位)