mysql 安装(windows,MySQL8.11)

1. mysql 安装

Windows 上安装 MySQL:

下载:

- https://dev.mysql.com/downloads/mysql/

移动:

- 移动到C:\Program Files\MySQL
- 创建 my.ini 配置文件,编辑 my.ini 配置以下基本信息:

[client]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=C:\Program Files\MySQL\mysql-8.0.17-winx64
# 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
# datadir=C:\\web\\sqldata
# 允许最大连接数
max_connections=20
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

打开bin目录

C:\Program Files\MySQL\mysql-8.0.17-winx64>cd bin

初始化数据库:

C:\Program Files\MySQL\mysql-8.0.17-winx64\bin>mysqld --initialize --console
2019-10-06T06:11:27.818450Z 0 [System] [MY-013169] [Server] C:\Program Files\MySQL\mysql-8.0.17-winx64\bin\mysqld.exe (mysqld 8.0.17) initializing of server in progress as process 15744
2019-10-06T06:11:27.820584Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-10-06T06:11:31.643420Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: :mX_bf%gJ0E!
2019-10-06T06:11:33.365916Z 0 [System] [MY-013170] [Server] C:\Program Files\MySQL\mysql-8.0.17-winx64\bin\mysqld.exe (mysqld 8.0.17) initializing of server has completed

安装:

C:\Program Files\MySQL\mysql-8.0.17-winx64\bin>mysqld install
Service successfully installed.

启动:

C:\Program Files\MySQL\mysql-8.0.17-winx64\bin>net start mysql
MySQL 服务正在启动 ..
MySQL 服务已经启动成功。

登录 MySQL

C:\Program Files\MySQL\mysql-8.0.17-winx64\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.17

Copyright (c) 2000, 2019, 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;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

修改密码:

mysql> alter user 'root'@'localhost' identified by '1234'
    -> ;
Query OK, 0 rows affected (0.03 sec)

完成

mysql> exit
Bye



2. navicat 激活

2.1 官网安装navicat:

  • https://www.navicat.com.cn/products

2.2 Github上下载作者发布破解工具:

  • https://github.com/DoubleLabyrinth/navicat-keygen/releases

2.3 破解文件移动到安装目录(navicat-keygen.exe、navicat-patcher.exe)

2.4 使用navicat-patcher.exe创建RegPrivateKey.pem文件:

C:\Program Files\PremiumSoft\Navicat Premium 12> navicat-patcher.exe "C:\Program Files\PremiumSoft\Navicat Premium 12"

2.5 使用navicat-keygen.exe进行破解:

C:\Program Files\PremiumSoft\Navicat Premium 12>navicat-keygen.exe -text .\RegPrivateKey.pem
***************************************************
*       Navicat Keygen by @DoubleLabyrinth        *
*                   Version: 4.0                  *
***************************************************

[*] Select Navicat product:
 0. DataModeler
 1. Premium
 2. MySQL
 3. PostgreSQL
 4. Oracle
 5. SQLServer
 6. SQLite
 7. MariaDB
 8. MongoDB
 9. ReportViewer

(Input index)> 1

[*] Select product language:
 0. English
 1. Simplified Chinese
 2. Traditional Chinese
 3. Japanese
 4. Polish
 5. Spanish
 6. French
 7. German
 8. Korean
 9. Russian
 10. Portuguese

(Input index)> 1

[*] Input major version number:
(range: 0 ~ 15, default: 12)> 12

[*] Serial number:
NAVO-D3NV-SQ3G-R4FU

[*] Your name: ...
[*] Your organization: ...

2.6 【断网】打开navicat,点击注册(试用、注册),输入注册码(上一个命令产生的Serial number),点击激活(手动激活)

2.7 复制navicat的请求码,粘贴到cmd中,回车

2.8 将cmd中的Activation Code粘贴到navicat的激活码中

2.9 激活成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值