当前位置:网站首页>J2EE从入门到入土01.MySQL安装
J2EE从入门到入土01.MySQL安装
2022-06-25 12:17:00 【也跌】
如何配置Java环境变量,链接中标题为startup.bat点击一闪而过解决方法(根本解决手段):Tomcat详细介绍01
以安装mysql5.7.23解压版为例
1、配置环境变量
MySQL和Eclipse在启动时都需要加载系统中的环境变量,其中MySQL加载的是MYSQL_HOME,MYSQL_HOME的值就是MySQL在你电脑上的路径,比如我的是 D:\programFiles\mysql-5.7.23-winx64中,这就需要我们将这个环境变量配置到自己的系统中,操作如下:

点击后来到高级系统设置详细界面

再点击新建就可以在下面的界面中填上环境变量的名称和值了

点击确定后再到系统变量中找到path并为MySQL配置路径

选中path后点击编辑,为MySQL配置路径(注:%MYSQL_HOME%\bin之前没有;分号的话一定要用英文的分号隔开,路径之后可以不添加分号),再点击确定之后环境变量就配置成功了
2.配置MySQL并启动
新建my.ini 放到D:\MyApps\mysql-5.7.23-winx64文件夹下,复制并粘贴以下内容至my.ini,其中basedir和datadir是你自己电脑安装MySQL的路径
[mysqld]
port = 3306
basedir=D:/programFiles/mysql-5.7.23-winx64
datadir=D:/programFiles/mysql-5.7.23-winx64/data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8
说明:
sql_mode
NO_ENGINE_SUBSTITUTION:mysql 在create table 时可以指定engine子句
STRICT_TRANS_TABLES:对于单个insert操作,无论插入单行或是多行,只要插入数据与字段类型不兼容,则insert操作失败并回滚。与mysql最接近的是mariadb
以管理员身份登录cmd,并使用cmd对D:\MyApps\mysql-5.7.23-winx64文件夹下的bin目录进行操作
搜索cmd,右键以管理员身份运行,或者如下图所示打开

首先在cmd中通过cd打开F:\MyApps\mysql-5.7.23-winx64文件夹下的bin目录

这一命令执行完成后没有反应就代表data文件夹已经产生在原来的文件路径中了
安装 mysqld -install
初始化 mysqld --initialize-insecure --user=mysql 根据刚刚my.ini文件去初始化,然后会产生一个data文件夹,按照以下步骤执行完成即可
启动 net start mysql
设置密码 mysqladmin -u root -p password 新密码
Enter password: 旧密码 直接回车,因为初始化直接把mysql的密码设置为空
连接 mysql -uroot -p
显示数据库 show databases;
显示表 show tables;
边栏推荐
- 微信全文搜索技术优化
- A half search method for sequential tables
- JS enter three integers a, B and C, and sort them from large to small (two methods)
- Oral English - continuous reading
- Jupyter notebook theme font setting and automatic code completion
- Go defer little knowledge
- MySQL adds, modifies, and deletes table fields, field data types, and lengths (with various actual case statements)
- 词法陷阱(C)
- Slice and slice methods of arrays in JS
- Foreach method of array in JS
猜你喜欢

2021-09-22

(2) Pyqt5 tutorial -- > using qtdesigner to separate interface code

Go novice exploration road 1
![[Visio]平行四边形在Word中模糊问题解决](/img/04/8a1de2983d648e67f823b5d973c003.png)
[Visio]平行四边形在Word中模糊问题解决

使用Visio画立方体

Connect with the flight book and obtain the user information according to the userid

Possible problems when idea encounters errors occurred while compiling module (solved)
![Select randomly by weight [prefix and + dichotomy + random target]](/img/84/7f930f55f8006a4bf6e23ef05676ac.png)
Select randomly by weight [prefix and + dichotomy + random target]
![[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1](/img/36/167397ce61240036c865dd99463f1b.jpg)
[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1

为何数据库也云原生了?
随机推荐
冷启动的最优解决方案
顺序表的折半查找法
Jupyter notebook theme font setting and automatic code completion
Match regular with fixed format beginning and fixed end
It is extraordinary to make a move, which is very Oracle!
(6) Pyqt5--- > window jump (registration login function)
3+1保障:高可用系统稳定性是如何炼成的?
(2) Pyqt5 tutorial -- > using qtdesigner to separate interface code
(7) Pyqt5 tutorial -- > > window properties and basic controls (continuous update)
Jeecgboot startup popup configuration is still incorrect
百度搜索稳定性问题分析的故事
AI assisted paper drawing of PPT drawing
Go novice exploration pause
el-select clear 清空内容时触发事件
Go novice exploration road 1
Connect with the flight book and obtain the user information according to the userid
MySQL and excel tables importing database data (Excel for MySQL)
Event triggered when El select Clear clears content
Parse JSON format data and save it to entity class
英语口语 - 连读