当前位置:网站首页>MySQL 8.0.11下载、安装和使用可视化工具连接教程
MySQL 8.0.11下载、安装和使用可视化工具连接教程
2022-04-23 13:06:00 【ArchieSean】
博主名取自《小羊肖恩》中的小羊肖恩,名字为:肖恩,音译为Sean,自己取的姓:阿奇,为符合我们的阅读习惯,连起来组成为ArchieSean。博主目前大三在读,志在将博客打造成为个人线上笔记的技术栈,方便自己也方便他人。如博客中有任何错误,请各位指出,谢谢大家。
MySQL的下载
下载地址: mysql下载官网链接




这里以8.0.11为例下载:

解压

安装前准备工作
首先我们把解压后的mysql文件,放置在我们要安装的盘符,这里我放置在d盘的根目录下,如图

此处更改了我的文件名为mysql-8.0.11。
- 紧接着我们要查看mysql-8.0.11目录下有没有有没有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. 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]
#skip-grant-tables
# 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.
# mysql根目录
basedir = D:/mysql-8.0.11
# 数据文件存放目录
datadir = D:/mysql-8.0.11/data
# 端口,默认3306
port = 3306
# 服务实例的唯一标识
# server_id = MySQL
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为utf8mb4
character_set_server=utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
# 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
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4
安装
- 打开cmd ,以管理员身份运行
- 复制mysql8.0.11的bin路径(如上图所示)
- 在cmd中输入cd D:\mysql-8.0.11\bin,回车
- 输入d:,回车
- 进入mysql的bin目录,接下来输入这句命令: mysqld --initialize --console后,回车,可见下图(以上所有的操作)

【此处敲黑板】将图中的红色框中的内容(密码)复制出来。不同电脑产生的这段内容不一样,先将密码复制出来(随便粘贴到一个地方,先放着还有用*)。 - 接下来继续在cmd中输入命令: mysqld --install

- 接下来启动mysql服务: 命令 net start mysql

- 登录mysql。继续输入命令: mysql -uroot -p密码 (此处的密码就是上边复制的内容)

(红框内容为上边复制的密码)若如图所示,则mysql登录成功
修改超级管理员密码
继续在上边登录成功的基础上继续使用cmd操作
- 将这段代码复制到cmd中:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'
上边代码的意思是修改超级管理员root的密码为root(密码根据个人需要进行更改)

(记得加上英文条件的“;”)修改密码成功并exit退出mysql服务。
- 验证一下
使用命令验证是否修改密码成功。
同理,在cmd中的mysql的bin目录下输入以下命令:
mysql -uroot -proot //此处密码如果不是我上边修改的root,可改为自己设置的密码

可视化工具Navicat的使用
- Navicat的安装在这里不做说明(直接next下一步就可安装)
- 使用: 一张图了解其基本使用

点击测试之后,显示成功即可,之后点击图中的确定按钮即可连接到mysql。
【此处敲黑板】在连接之前,要保证mysql的服务是开启状态,就是上边命令中的: net start mysql 开启服务。
若其中有任何问题,请评论区指出,谢谢。
版权声明
本文为[ArchieSean]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_41964942/article/details/105993401
边栏推荐
- Teach you to quickly develop a werewolf killing wechat applet (with source code)
- Go language: passing slices between functions
- Use of Presto date function
- AUTOSAR from introduction to mastery 100 lectures (50) - AUTOSAR memory management series - ECU abstraction layer and MCAL layer
- 世界读书日:我想推荐这几本书
- Nodejs + websocket cycle small case
- Wu Enda's programming assignment - logistic regression with a neural network mindset
- Start mqbroker CMD failure resolution
- Learning materials
- The filter() traverses the array, which is extremely friendly
猜你喜欢

31. 下一个排列

100 GIS practical application cases (52) - how to keep the number of rows and columns consistent and aligned when cutting grids with grids in ArcGIS?

CMSIS cm3 source code annotation

Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误

世界读书日:我想推荐这几本书

Summary of JVM knowledge points - continuously updated
![[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie](/img/d1/b0ec21419db0cd3641f5fae8458c50.png)
[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie

Free and open source charging pile Internet of things cloud platform

Record the problems encountered in using v-print

数据库中的日期时间类型
随机推荐
Date time type in database
Use of Presto date function
filter()遍历Array异常友好
Kernel error: no rule to make target 'Debian / canonical certs pem‘, needed by ‘certs/x509_ certificate_ list‘
R语言中dcast 和 melt的使用 简单易懂
Connect orcale
Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误
Start mqbroker CMD failure resolution
HQL find the maximum value in a range
Jupiter notebook installation
7_Addmodule和基因加和法add 得到的细胞类型打分在空间上空转对比
mui 微信支付 排坑
Byte warehouse intern interview SQL questions
Byte jump 2020 autumn recruitment programming question: quickly find your own ranking according to the job number
Servlet监听器&过滤器介绍
初鉴canvas,展示个小小的小案例
Wu Enda's programming assignment - logistic regression with a neural network mindset
CVPR 2022 & ntire 2022 | the first transformer for hyperspectral image reconstruction
Huawei cloud MVP email
Go language: passing slices between functions