服务器之家:专注于服务器技术及软件下载分享
分类导航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|

服务器之家 - 数据库 - Mysql - mysql 5.7.20\5.7.21 免安装版安装配置教程

mysql 5.7.20\5.7.21 免安装版安装配置教程

2020-08-25 16:08antma Mysql

这篇文章主要为大家详细介绍了mysql5.7.20和mysql5.7.21免安装版安装配置教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

mysql 下载安装配置 5.7.20 / 5.7.21,供大家参考,具体内容如下

1、下载mysql,下载地址

mysql 5.7.20\5.7.21 免安装版安装配置教程

选择操作系统和版本,我是64位win10,点击 Download 后会跳到Oracle登录页面要求登录后才能下载:

mysql 5.7.20\5.7.21 免安装版安装配置教程

登录后下载:

mysql 5.7.20\5.7.21 免安装版安装配置教程

2、下载完成后解压:

mysql 5.7.20\5.7.21 免安装版安装配置教程

3、在mysql要目录下创建 my.ini 文件,如上图,文件内容如下,basedir 和 datadir 修改为相应地址:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:/tools/ent/db/mysql-5.7.20-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:/tools/ent/db/mysql-5.7.20-winx64/data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

4、cmd进入bin目录下,执行 mysqld --initialize-insecure

?
1
\mysql-5.7.20-winx64\bin>mysqld --initialize-insecure

5、然后执行 mysqld -install

?
1
mysql-5.7.20-winx64\bin>mysqld -install

提示 Service successfully installed ,即安装成功

6、启动服务

?
1
D:\tools\ent\db\mysql-5.7.20-winx64\bin>net start mysql

7、停止服务

?
1
D:\tools\ent\db\mysql-5.7.20-winx64\bin>net stop mysql

8、登录mysql

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
D:\tools\ent\db\mysql-5.7.20-winx64\bin>mysql -uroot -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.20 MySQL Community Server (GPL)
 
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> show databases;
+--------------------+
| Database  |
+--------------------+
| information_schema |
| api  |
| ibase4j  |
| jpress  |
| mysql  |
| performance_schema |
| srmhome  |
| sys  |
| wordpress  |
+--------------------+
9 rows in set (0.00 sec)
 
mysql>

完成!

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。

原文链接:http://blog.csdn.net/antma/article/details/79224279

延伸 · 阅读

精彩推荐