-
mysql安装
1.地址:https://dev.mysql.com/downloads/
2.进入后点击以下步骤:
(1).点击 mysql Community Server(MySQL社区版)
(2).查看 Select Operating System: 下可以选择本机系统,默认Windows系统,Other Downloads: 下选择MySQL安装包点击 Downloads下载,
3.将安装包解压到自己的目录,进入文件夹,在和bin同目录下创建个data目录,再创建个mysql.ini文件
4.向mysql.ini文件里面添加以下内容:
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=F:\mysql\mysql-5.7.24-winx64\mysql-5.7.24-winx64
# 设置mysql数据库的数据的存放目录
datadir=F:\mysql\mysql-5.7.24-winx64\mysql-5.7.24-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
5.以管理员运行cmd,进入MySQL的bin目录
Microsoft Windows [版本 10.0.18363.1379]
(c) 2019 Microsoft Corporation。保留所有权利。
C:\WINDOWS\system32>cd C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin
C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin>mysqld --install
Service successfully installed.
C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin>mysqld --initialize --console //安装MySQL
2021-03-09T02:08:00.902820Z 0 [System] [MY-013169] [Server] C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin\mysqld.exe (mysqld 8.0.23) initializing of server in progress as process 14588
2021-03-09T02:08:00.932888Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-03-09T02:08:01.611207Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-03-09T02:08:03.072702Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: .)Gs><ov_7Gr //出现密码,要记住
C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin>net start mysql //启动服务
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin>mysql -u root -p //登录MySQL
Enter password: ************ //密码,刚才上面需要记住的密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.23
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
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> alter user 'root'@'localhost' identified by '123456'; //开头出现“mysql>”表示成功,此处就来修改密码
Query OK, 0 rows affected (0.01 sec)
mysql> exit //成功后退出
Bye
C:\Users\1\Desktop\DownloadSoftware\mysql\sqloftware\mysql-8.0.23-winx64\bin>mysql -u root -p //用修改的密码再次登录sql看能否成功
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.23 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
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> //成功
//完成!!!
参考博客:https://www.cnblogs.com/winton-nfs/p/11524007.html
出处:https://www.cnblogs.com/sazxj/p/14510522.html
栏目列表
最新更新
80386学习(二) 80386特权级保护
80386学习(一) 80386CPU介绍
8086汇编语言学习(十) 8086中断
8086汇编语言学习(九) 8086标志寄存器
8086汇编语言学习(九) 8086标志寄存器
8086汇编语言学习(八) 8086子程序
8086汇编语言学习(六) 8086处理结构化数据
8086汇编语言学习(五) 8086寻址方式
8086汇编语言学习(四) 8086汇编程序的编译
8086汇编语言学习(三) 8086中的段和栈
三大常用数据库事务详解之三:事务运行
三大常用关系型数据库事务详解之二:基
三大关系型数据库事务详解之一:基本概
MongoDB常用命令(2)
MongoDB基本介绍与安装(1)
SQLServer触发器调用JavaWeb接口
SQL Server索引的原理深入解析
SqlServer2016模糊匹配的三种方式及效率问题
SQL中Truncate的用法
sqlserver 多表关联时在where语句中慎用tri
在vscode中使用R时,用快捷键来快捷键入卡
VB.NET中如何快速访问注册表
ASP.NET中图象处理过程详解
Vue(1)Vue安装与使用
JavaScript 语言入门
js将一段字符串的首字母转成大写
纯原生html编写的h5视频播放器
H5仿原生app短信验证码vue2.0组件附源码地
TypeScript(4)接口
TypeScript(3)基础类型