当前位置:网站首页>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
边栏推荐
- NGUI,冷却效果
- Detail measurement of DC-DC and PDN with network analyzer
- White screen time, first screen time
- Online files are not transferred to Base64
- Pyspark case series 4-dataframe output to a single folder solution
- Fix the problem that uicollectionview does not reach the bottom security zone
- When installing mysql, an error occurred because msvcr120 could not be found DLL, unable to continue code resolution "
- NFT products are alive
- C#入門系列(十一) -- 多維數組
- Golang compilation and linking parameters, runtime
猜你喜欢

使用 Hystrix 实现微服务的容错处理

MySQL基础篇常用约束总结上篇

选择DC-DC开关电源控制器的实战过程

NFT 2.0: 下一代的NFT将是精简且值得信赖的NFT

Global pooling – pytoch

金仓数据库KingbaseES中的sys_checksums坏块检测功能

Mxnet construction and implementation of alexnet model (comparison with lenet)

EMC rectification cases of electronic equipment radiation

云画质助手iApp源码

Windows 安装MySQL5.7 以上的版本(压缩包形式安装)
随机推荐
Global pooling – pytoch
Cloud image quality assistant IAPP source code
International multilingual sea mall rebate product automatic matching order source code
金仓数据库KingbaseES UDP监控工具的使用
Mn Monet pagoda host system v1.5 release
1. system in Library
电子设备辐射EMC整改案例
MN梦奈宝塔主机系统V1.5版本发布
5. read the specified pathname -dirname
Beginning an excellent emlog theme
Ngui, map zoom in and out
MySQL foundation part common constraints summary part 2
NFT 2.0: the next generation of NFT will be lean and trustworthy
Golang compilation and linking parameters, runtime
C # introductory series (11) -- multidimensional array
修复UICollectionView 没有到达底部安全区的问题
Window管理深入了解WindowManagerService
Kingbasees create database objects in batch
校园失物招领小程序源码可作毕业设计
Use of kingbasees UDP monitoring tool for gold warehouse database