当前位置:网站首页>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
边栏推荐
- Install nngraph
- 22. Bracket generation
- 这几种 VSCode 扩展是我最喜欢的
- Translation of attention in natural language processing
- 100 lectures on practical application cases of Excel (VIII) - report connection function of Excel
- PC starts multiple wechat at one time
- AUTOSAR from introduction to mastery 100 lectures (86) - 2F of UDS service foundation
- Introduction to servlet listener & filter
- 世界读书日:我想推荐这几本书
- office2021安装包下载与激活教程
猜你喜欢
31. 下一个排列
Use Proteus to simulate STM32 ultrasonic srf04 ranging! Code+Proteus
8 websites that should be known for product development to enhance work experience
three.js文字模糊问题
31. Next arrangement
About the 'enum' enumeration type and structure.
Process virtual address space partition
Summary of JVM knowledge points - continuously updated
[51 single chip microcomputer traffic light simulation]
Hbuilderx + uniapp packaging IPA submission app store stepping on the pit
随机推荐
Recovering data with MySQL binlog
内核错误: No rule to make target ‘debian/canonical-certs.pem‘, needed by ‘certs/x509_certificate_list‘
AUTOSAR from introduction to mastery 100 lectures (83) - bootloader self refresh
Async void caused the program to crash
STM32 tracking based on open MV
[untitled] PID control TT encoder motor
7_ The cell type scores obtained by addmodule and gene addition method are compared in space
精度、速度完美平衡,最新图像分割SOTA模型重磅发布!!!
HQL statement tuning
These vscode extensions are my favorite
STD:: shared of smart pointer_ ptr、std::unique_ ptr
The El table horizontal scroll bar is fixed at the bottom of the visual window
About the 'enum' enumeration type and structure.
mysql 基本语句查询
51 single chip microcomputer stepping motor control system based on LabVIEW upper computer (upper computer code + lower computer source code + ad schematic + 51 complete development environment)
nodejs + mysql 实现简单注册功能(小demo)
Install nngraph
Mysql8 installation
Conflict between Mui picker and drop-down refresh
Record a website for querying compatibility, string Replaceall() compatibility error