当前位置:网站首页>mysql安装配置以及创建数据库和表
mysql安装配置以及创建数据库和表
2022-07-05 09:25:00 【本卡】
mysql安装配置
1、安装
鉴于我自己的环境是window11,所以这里展示的是win版的安装
安装地址:https://dev.mysql.com/downloads/mysql/

这里我选择的是上一个Windows (x86, 64-bit), ZIP Archive,点击对应的download
进入该界面后,不用管这些注册内容,点击no thanks,just start my download就可以
在c盘(也可自己选择)中创建一个mysql文件夹,然后把下载好的压缩包解压到里面
2、配置
进行好上面的步骤之后我们进行配置
在文件中先创建一个my.ini文件,输入以下内容(注意:其中basedir必须是自己的安装目录!!!)
[client]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=C:\\mysql\\mysql-8.0.29-winx64
# 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
# datadir=C:\\mysql\\mysql-8.0.29-winx64
# 允许最大连接数
max_connections=20
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
然后在系统环境里配置好(如最后一行)
3、启动
打开cmd,切换目录(自己的目录!!)
cd C:\mysql\mysql-8.0.29-winx64\bin
初始化数据库
mysqld --initialize --console
执行之后会显示出形如下面的初始密码
...
2022-04-20T02:35:05.464644Z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: APWCY5ws&hjQ
...
比如这里APWCY5ws&hjQ就是初始密码
4、Navicat安装
为了更好的使用mysql,建议再安装一个图形界面navicat来操作mysql
安装链接https://www.navicat.com/en/download/navicat-for-mysql
我这里安装的是win64位的试用版
下载之后运行exe文件
点击next
点击accept
选择安装目录

是否安装快捷方式
点击安装等待安装
安装完成
5、建立一个数据库
我这里展示一个数据库建立过程,主要是建立中国各地的人均工资水平
首先打开navicat for sql进行链接
自己选择写一个connection name,输入password,即可链接成功
右键新建数据库
给新建的数据库命名,并规范数据库为utf-8编码
双击打开这个数据库,新建一个表
创建表结构,输入对应字段
保存之后即可编辑该数据
边栏推荐
- 阿里云发送短信验证码
- [reading notes] Figure comparative learning gnn+cl
- Jenkins pipeline method (function) definition and call
- Node collaboration and publishing
- Applet global style configuration window
- It's too difficult to use. Long articles plus pictures and texts will only be written in short articles in the future
- Creation and reference of applet
- OpenGL - Lighting
- OpenGL - Lighting
- Svgo v3.9.0+
猜你喜欢

nodejs_ fs. writeFile

Nodemon installation and use
![Rebuild my 3D world [open source] [serialization-2]](/img/e6/aad5f432aca619b992753187729dcf.jpg)
Rebuild my 3D world [open source] [serialization-2]

Deep understanding of C language pointer

A detailed explanation of the general process and the latest research trends of map comparative learning (gnn+cl)

22-07-04 Xi'an Shanghao housing project experience summary (01)

22-07-04 西安 尚好房-项目经验总结(01)

高性能Spark_transformation性能

【阅读笔记】图对比学习 GNN+CL

Huber Loss
随机推荐
A detailed explanation of the general process and the latest research trends of map comparative learning (gnn+cl)
【阅读笔记】图对比学习 GNN+CL
一文详解图对比学习(GNN+CL)的一般流程和最新研究趋势
牛顿迭代法(解非线性方程)
LeetCode 496. 下一个更大元素 I
项目实战 | Excel导出功能
fs. Path module
22-07-04 西安 尚好房-项目经验总结(01)
22-07-04 Xi'an Shanghao housing project experience summary (01)
图神经网络+对比学习,下一步去哪?
Rebuild my 3D world [open source] [serialization-1]
. Net service governance flow limiting middleware -fireflysoft RateLimit
np. allclose
Huber Loss
Newton iterative method (solving nonlinear equations)
一篇文章带你走进cookie,session,Token的世界
STM32 simple multi-level menu (array table lookup method)
High performance spark_ Transformation performance
The research trend of map based comparative learning (gnn+cl) in the top paper
什么是防火墙?防火墙基础知识讲解