安装My SQL

作者: WhiteStruggle | 来源:发表于2020-02-27 22:08 被阅读0次

一、 首先官网安装
地址

安装第一个是Windows(x86,64位),ZIP存档

第二个是Windows(x86,64位),ZIP存档调试二进制文件和测试套件

根据需要下载
(我下载的是第一个)

二、 然后用管理员身份打开命令提示符

(1)找到安装目录,有些文件名过长,可以输入一部分利用tab键补全
(注意此处的文件夹“My SQL” 中间有空格)

C:\Windows\system32>d:

D:\>cd "My SQL"

D:\My SQL>cd mysql-8.0.19-winx64

D:\My SQL\mysql-8.0.19-winx64>cd bin

(2)输入:

D:\My SQL\mysql-8.0.19-winx64\bin>mysqld --install

结果(正常情况下)如下,此步就成了

Service successfully installed.

①若出现

Install/Remove of the Service Denied

,不要慌张,那是因为你没有使用使用管理员身份打开cmd

②若直接弹出

image
这是由于下载了vs2017 以上版本,不是MySQL的问题,二者冲突,可以下载
微软常用运行库合集,百度或者360软件管家都可以下载

(3)在安装目录下(D:\My SQL\mysql-8.0.19-winx64)新建文件my.ini

写入内容:

[client]
# 设置mysql客户端默认字符集
default-character-set=utf8
 
[mysqld]


# 设置3306端口
port = 3306

# 设置mysql的安装目录
basedir=D:\\My SQL\\mysql-8.0.19-winx64

# 允许最大连接数
max_connections=20

# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8

# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

然后利用管理员身份运行cmd,输入:

D:\My SQL\mysql-8.0.19-winx64\bin>mysqld --initialize --console
2020-02-06T08:30:48.674372Z 0 [System] [MY-013169] [Server] D:\My SQL\mysql-8.0.19-winx64\bin\mysqld.exe (mysqld 8.0.19) initializing of server in progress as process 3936
2020-02-06T08:30:48.675666Z 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.
2020-02-06T08:30:50.016735Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: kY6q10yeu<py

连接MySQL

D:\My SQL\mysql-8.0.19-winx64\bin>net start mysql
MySQL 服务正在启动
MySQL 服务已经启动成功。

如果MySQL没有启动,可以打开计算机管理,找到服务,然后找到MySQL,启动就可以了

(4)连接mysql,输入

D:\My SQL\mysql-8.0.19-winx64\bin>mysql -u root -p
Enter password:
//请看第三步当输入mysqld --initialize --console,之后弹出一堆,请关注[Note] [MY-010454] [Server] A temporary password is generated for root@localhost,在冒号后面的就是此处的密码,因此我的密码就是 kY6q10yeu<py

//注意密码是随机产生的

成功的标志:

D:\My SQL\mysql-8.0.19-winx64\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.19

Copyright (c) 2000, 2020, 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>

密码输入错误的报错

  1. 不写密码直接回车
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  1. 输入错误密码
Enter password: ******
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

三、 登陆之后想修改密码的话

输入

alter user user() identified by "888888";

因此你的密码就回改为 888888

net start mysql 启动MySQL
net stop mysql  停止MySQL
sc delete mysql 卸载MySQL

exit 退出

破解:Navicat Premium 12教程

https://www.cnblogs.com/suguangti/p/10875870.html

为防止链接过时,大概步骤如下:

  1. 先不要打开软件,打开注册机,点击左上角的patch,找到Navicat Premium 12的安装路径,注意有360和其他一些杀毒软件的需要先退出
  2. 打开Navicat Premium 12,然后有个弹出框,点击左边的注册(Genarate)
  3. 找到注册机右边的Greerate,点击,将其左边的内容,复制到Navicat Premium 12注册码的位置
  4. 点击注册,接着选择手动注册,将请求码复制粘贴到注册机Request Code
  5. 然后点击Generate,接着把Activation Code的内容复制粘贴到Navicat Premium 12对应的位置,之后你就成了

相关文章

网友评论

    本文标题:安装My SQL

    本文链接:https://www.haomeiwen.com/subject/cwpfhhtx.html