当前位置:网站首页>MySQL download, installation and use - complete and detailed steps
MySQL download, installation and use - complete and detailed steps
2022-06-11 10:44:00 【weixin_ thirty-nine million four hundred and fifty thousand one】
Catalog
1. download MySQL Compressed package
1. Production services :....--install mysql
2. start-up mysql:net start mysql
4. You can see in the service mysql This service
4. Enter for the first time , Remember to give mysql Set a password :
5. Check the existing database
6. sign out ( Close the connection )
7. Connect again MySQL( You need to enter a password )
One 、 install MySQL
1. download MySQL Compressed package
Download address :MySQL :: Download MySQL Community Server (Archived Versions)
Download here is MySQL Of 5.7.31 edition ,windows,64 position .

Downloaded zip Compressed package :
2. install mysql
mysql-5.3.71-winx64.zip Is an installation free version .
- decompression zip file
- Put the unzipped compressed package file into the path ( Don't have a Chinese path )( I put it here D:\Program Files Next )

3. create profile
stay mysql Installation directory , Create a my.ini The configuration file , Then add the following to it (mysql The installation directory should be changed to its own ):
### my.ini
[mysqld]
basedir = "D:\Program Files\mysql-5.7.31-winx64" #mysql The installation directory
datadir = "D:\Program Files\mysql-5.7.31-winx64\data" #mysql The installation directory +data
port=3306
character-set-server=utf8
character_set_filesystem= binary
[client]
port=3306
default-character-set = utf8
[mysqld_safe]
timezone="CST"
[mysql]
default-character-set=utf8
4. initialization
- Open the terminal & Run as Administrator :

Input the initialization command at the terminal , Meeting Generate a to root Username , User data with empty password :( In the double quotation marks before the command is :mysql Installation directory )
"D:\Program Files\mysql-5.7.31-winx64\bin\mysqld.exe" --initialize-insecure
# Their own mysql The installation directory + --initialize-insecure
- After successful command execution ,mysql A new one will be added to the directory data Catalog :

thus ,MySQL Installation is complete .
Two 、 start-up MySQL
1. Production services :....--install mysql
"D:\Program Files\mysql-5.7.31-winx64\bin\mysqld.exe" --install mysql2. start-up mysql:net start mysql
3. close mysql:net stop mysql

4. You can see in the service mysql This service
then win+R, Input services.msc, You can see in the service mysql This service : 

3、 ... and 、 Connect the test
1. take mysql The installation directory ”D:\Program Files\mysql-5.7.31-winx64\bin\“ Add to system environment variable .
Right click on my computer ——> attribute ——> Advanced system setup ——> environment variable ——> In the system variable “Path”——> spot “ edit ”——>” newly build “——> take ”D:\Program Files\mysql-5.7.31-winx64\bin\“ Add to system environment variable ——>” determine “.


2. start-up mysql service :


3. At this time, you don't need administrator permission , Open it directly cmd, Input mysql -u root -p:
No password by default , Just click enter , Last appearance "mysql>" It's a success .

4. Enter for the first time , Remember to give mysql Set a password :
( Next time you enter mysql Directly enter the set password )
set password = password('root123'); # Set the password to root123
5. Check the existing database
Input :show databases;

6. sign out ( Close the connection )
Input :exit;

7. Connect again MySQL( You need to enter a password )

8. Summary command
C:\Users\dell>mysql -u root -p # stay cmd Terminal input command , Get into mysql
mysql> set password = password('root123'); # Enter for the first time mysql after , Set the password
mysql> show databases; # Display database
mysql> exit; # sign out
C:\Users\dell>mysql -u root -p # stay cmd Terminal input command , Once again into the mysql
Input password # At this time , Entry required mysql Password
mysql> exit; # sign out notes : If you want to delete mysql service , Reinstall mysql service , You can refer to the following steps :
# The specific orders are as follows :
Enter as Administrator cmd:
C:\WINDOWS\system32>"D:\Program Files\mysql-5.7.31-winx64\bin\mysqld.exe" --remove mysql # Delete mysql service
Delete D:\Program Files\mysql-5.7.31-winx64 Install under directory data file
C:\WINDOWS\system32>"D:\Program Files\mysql-5.7.31-winx64\bin\mysqld.exe" --initialize-insecure # Reinitialize
C:\WINDOWS\system32>"D:\Program Files\mysql-5.7.31-winx64\bin\mysqld.exe" --install mysql # reinstall mysql service
C:\WINDOWS\system32>net start mysql # start-up mysql service
C:\WINDOWS\system32>mysql -u root -p # Get into mysql
Enter password: # Enter for the first time , No password , Directly by enter that will do
mysql> set password = password('root123'); # Enter for the first time , Set a password to root123
mysql> show databases; # Display the original database
mysql> exit; # sign out mysql
C:\WINDOWS\system32>net stop mysql # stop it mysql service 

Reference resources :
newest Python Of web Develop a family bucket (django+ front end + database )_ Bili, Bili _bilibili 26-MySQL- Step by step
边栏推荐
- Window管理深入了解WindowManagerService
- Hardware Description Language HDL
- Ngui, map zoom in and out
- Internet of things security in the era of remote work
- Explain the physical layer consistency test of 2.5g/5g/10g Base-T Ethernet interface in detail!
- NewOJ Week 2---BCD
- VMware install win7 virtual machine
- Design and implementation of interest social software platform based on location service (LBS) SSM framework
- Waiting event enq: Ko - some feasible processing methods for fast object checkpoint
- 微信云开发Al短视频一键换脸小程序源码
猜你喜欢

Leetcode 1952. Triple divisor

Cloud development MBTI personality type test assistant wechat applet source code

Explain the physical layer consistency test of 2.5g/5g/10g Base-T Ethernet interface in detail!

远程监控项目离线日志说明书
使用 Feign 实现声明式 REST 调用

基于位置服务(LBS)的SSM的框架实现的兴趣社交软件平台设计与实现

Arbitrum 基础架构:快速入门

MySQL基础篇常用约束总结上篇
![[machine learning theory] true positive, true negative, false positive, false negative concept](/img/59/8264d6cbd96480b59e5b8ff96320be.png)
[machine learning theory] true positive, true negative, false positive, false negative concept

NFT产品是有生命的
随机推荐
金仓数据库KingbaseES UDP监控工具的使用
Jszip get the file of the specified file in the uploaded zip package
What is digital twin? A real-time and virtual representation
使用 Hystrix 实现微服务的容错处理
Design and implementation of interest social software platform based on location service (LBS) SSM framework
数字藏品app系统源码
使用bat向文件的第一行中写入内容
Tiktok encounters cultural conflict in the UK, and many employees leave in a short time
Leetcode 1952. 三除数
为什么DDRx的电源设计时需要VTT电源
Encrypt and decrypt strings using RSA and Base64
6.如何自动生成头文件依赖 -M
金仓数据库KingbaseES中的sys_checksums坏块检测功能
详解2.5G/5G/10G Base-T以太网接口物理层一致性测试!
Jedislock redis distributed lock implementation
NFT 2.0: the next generation of NFT will be lean and trustworthy
Windows 安装MySQL5.7 以上的版本(压缩包形式安装)
电子设备辐射EMC整改案例
基于C语言实现比赛评分系统
Half of the property rights of the house are registered in the woman's name when they are in love, and they want to return after they break up