当前位置:网站首页>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
边栏推荐
- office2021安装包下载与激活教程
- Software testing weekly (issue 68): the best way to solve difficult problems is to wait and see the changes and push the boat with the current.
- Custom nail robot alarm
- Use Proteus to simulate STM32 ultrasonic srf04 ranging! Code+Proteus
- Introducing vant components on demand
- Start mqbroker CMD failure resolution
- The project file '' has been renamed or is no longer in the solution, and the source control provider associated with the solution could not be found - two engineering problems
- Go language array operation
- (personal) sorting out system vulnerabilities after recent project development
- 数据库中的日期时间类型
猜你喜欢
hbuilderx + uniapp 打包ipa提交App store踩坑记
8 websites that should be known for product development to enhance work experience
There is no need to crack the markdown editing tool typora
Melt reshape decast long data short data length conversion data cleaning row column conversion
Recovering data with MySQL binlog
The project file '' has been renamed or is no longer in the solution, and the source control provider associated with the solution could not be found - two engineering problems
31. Next arrangement
Servlet监听器&过滤器介绍
[51 single chip microcomputer traffic light simulation]
About the 'enum' enumeration type and structure.
随机推荐
Process virtual address space partition
filter()遍历Array异常友好
Record Alibaba cloud server mining program processing
STM32 is connected to the motor drive, the DuPont line supplies power, and then the back burning problem
8 websites that should be known for product development to enhance work experience
7_Addmodule和基因加和法add 得到的细胞类型打分在空间上空转对比
These vscode extensions are my favorite
Custom nail robot alarm
Async void provoque l'écrasement du programme
Go iris framework implements multi service Demo: start (listen to port 8084) service 2 through the interface in service 1 (listen to port 8083)
World Book Day: I'd like to recommend these books
Go language: passing slices between functions
Install nngraph
SQL exercise question 1
1130 - host XXX is not allowed to connect to this MySQL server error in Navicat remote connection database
The filter() traverses the array, which is extremely friendly
async void 導致程序崩潰
AUTOSAR from introduction to mastery 100 lectures (50) - AUTOSAR memory management series - ECU abstraction layer and MCAL layer
JMeter operation redis
AUTOSAR from introduction to mastery 100 lectures (87) - key weapon of advanced EEA - AUTOSAR and DDS