当前位置:网站首页>mysql mysql-8.0.19-winx64 安装与navicat连接
mysql mysql-8.0.19-winx64 安装与navicat连接
2022-06-25 17:20:00 【青灯剑客】
迷迷糊糊的费了点劲,所以记录下来。
前沿:mysql本身是没有桌面可视化的,需要借助工具来展示,比如:navicat.
一、安装mysql
(1)官网安装。
官网上有2个版本.zip和.msi。我看了一下 .msi版本找不到64位的,那就下载.zip版64位的吧。
点进去以后,可以不用注册,直接选择“No thanks, just start my download”
(2)下载好后,解压。将文件mysql-8.0.19-winx64 放在自己平时安装软件的地方,我自己的地址是“C:\install”。
(3)配置环境变量。在Path下添加 C:\install\mysql-8.0.19-winx64\bin。
(4)配置my.ini文件。
在C:\install\mysql-8.0.19-winx64\bin中新建一个.txt文件,将其改为my.ini,将下面的复制上,注意修改后缀为.ini。
[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录
basedir=C:\install\mysql-8.0.19-winx64\bin
# 设置mysql数据库的数据的存放目录
datadir=C:\Program Files\mysql-8.0.19-winx64\data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为UTF8
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8
之后,退出linux环境,重新用 管理员身份登录 powershell。
(5)初始化mysql并启动
初始化命令
mysqld --initialize --console
注意:此处会打印数据库密码,记住该密码,后面会用到。
(6)安装MySQL服务:mysqld --install
(7)启动服务器
退出,重新进入linux环境。输入命令
net start mysql
其他命令还有:
停止服务命令:net stop mysql。
卸载 MySQL 服务命令:sc delete MySQL/mysqld -remove
(8)登陆数据库命令
mysql -u root -p
这时会让你输入密码。输入完密码正常就会进入MySQL的命令模式了
(9)进入之后必须修改密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';
注意:修改密码,注意命令尾的;一定要有,这是mysql的语法
(10)到此,安装部署就完成了。官方说测试速度MySQL8比5快两倍。
可以用 命令查看一下默认安装的数据库:
show databases;
use mysql;
show tables;
二、navicat安装
我从csdn上下载了一个带注册机的。用起来很happy。版本是navicat120_premium
安装步骤:
(1)先选择64/32位的版本,然后(管理员模式)把navicat120_premium 安装到自己心仪的位置。
(2)一定要用 管理员模式来运行注册机 PatchNavicat.exe。
三、navicat 链接mysql数据库
很简单。
(1)选择右上角的“文件”–>“新建链接”–>“mysql”。
(2)填写Mysql的信息
【连接名:新建数据库的名字,此处为“本地”】;
【主机:你本机的ip地址或者直接输入’localhost’】;
【端口:一般为默认的3306】(查看我们的my.ini);
【用户名:默认为‘root’】;
【密码:进入mysql命令时设置的密码】–>【确定】。
之后点击建立的连接就可查看数据库内容。
边栏推荐
- WPF开发随笔收录-心电图曲线绘制
- Learn Tai Chi Maker - mqtt (III) connect to mqtt server
- 学习太极创客 — MQTT(一)MQTT 是什么
- Redis 的PSYNC命令
- Best practices for data relocation: using CDM to relocate offline Mysql to DWS
- CVPR small target detection: context and attention mechanisms improve small target detection (attached with paper Download)
- Precautions for using timer_cap.c of Jerry [chapter]
- 求满足条件的最长子串长度
- 什么是公链开发?公链开发项目有哪些?
- UART波特率对时钟精度的要求有多高?
猜你喜欢

Distinguishing seven kinds of facial expressions by deep separable convolution neural network

Learning Tai Chi makers - mqtt (I) what is mqtt

软考中的嵌入式系统设计师为什么考的人少?

单例模式应用

How smart PLC constructs ALT instruction
![Jericho's method of obtaining reset source and wakeup IO port [chapter]](/img/93/30d5075a3da1ace7438ae06c1b1775.png)
Jericho's method of obtaining reset source and wakeup IO port [chapter]

【Matlab】数据插值

WPF开发随笔收录-心电图曲线绘制

记一次基于PHP学生管理系统的开发

Under the same WiFi, the notebook is connected to the virtual machine on the desktop
随机推荐
【黑苹果】联想拯救者Y70002019PG0
Learning Tai Chi makers - mqtt (I) what is mqtt
A development of student management system based on PHP
匯編語言(5)寄存器(內存訪問)
try with resource
杰理之系统时钟设置出现复位或无效问题【篇】
The role of the project manager in the project
杰理之定时器使用注意事项【篇】
Golang sort slice int
Langage d'assemblage (5) Registre (accès à la mémoire)
WARNING: Unsupported upgrade request.
[black apple] Lenovo Savior y70002019pg0
Sword finger offer 50 First character that appears only once
Win10开启热点共享后断网怎么解决?
CVPR small target detection: context and attention mechanisms improve small target detection (attached with paper Download)
杰理之定时器捕获(timer_cap.c)使用注意事项【篇】
中断操作:AbortController学习笔记
Involution? Foam? Change? Ten questions directly hit the core puzzle of "meta universe" – the essence of "ask ta- Wang Lei about the time of the universe"
Will the 2022 cloud world be better
Solution to the problem of incorrect clock in FreeRTOS kernel