当前位置:网站首页>MySQL zip installation tutorial
MySQL zip installation tutorial
2022-04-23 03:31:00 【Jack_ joker】
install mysql Previous suggestions :
It is recommended not to install the latest version , General mysql5.0 Series version is OK ; I just found a random version MySQL, The latest edition 8.0.28
mysq1 Official website .zip and .msi There are two types of installation ;
zip It's a compression pack , Decompress directly after the use of , You need to configure everything yourself ;msi Is the installation package , The system helps us install it directly ;
Novices suggest using msi Installation mode ; Recommended for old birds zip Installation mode , Problems can be solved easily ;
Let's introduce zip Installation method of decompressed version :
First, in the MySQL Download the version you want on the official website MySQL; link : MySQL Download address .
Unzip the package to the location you want to install : Choose here C:\JavaDev\MySQL;
Then in the installation file directory C:\JavaDev\MySQL\mysql-8.0.28-winx64 Next , newly build mysql.ini The configuration file ;
Open it with notepad , The edit content under the file is as follows :
[mysql]
default-character-set=utf8
[mysqld]
# Set up 3306 port
port = 3306
# Set up mysql Installation directory
basedir = C:\\web_soft\\mysql-8.0.17-winx64\\
# Set up mysql Database data storage directory
datadir = C:\\web_soft\\mysql-8.0.17-winx64\\data
# Maximum connections allowed
max_connections=20
# The character set used by the server defaults to 8 Bit coded latin1 Character set
character-set-server=utf8
# The default storage engine that will be used when creating a new table
default-storage-engine=INNODB
# Create mode
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Copy, edit and save ;
Next, configure the environment variables : Computer — attribute — Advanced system setup — environment variable , add to MySQL Decompression path . Remember it was bin Under the table of contents ;

Then use the Administrator powershell panel , Yes mysql Installation ;
First enter your installation directory ,eg:C:\JavaDev\MySQL\mysql-8.0.28-winx64
Input mysqld --initialize-insecure, Execute this command to initialize data Catalog , You can see the new folder under the installation directory data Folder ;
Be careful : Enter this initialization command ,mysql Your initial password is set to none ; Input mysql -uroot -p When prompted for a password , direct enter Just go ;
Then install mysqld service : Input mysqld --install command , install mysqld service :
Here we need to pay attention to ; If an error is reported the service already exist; Uninstall before instructions mysql It was not uninstalled completely at the time of ,mysql The service still exists ; You need to remove mysql service , Reference article : link .
Then start mysql service , Input net start mysql, Start the service

Sign in mysql: perform mysql -u root -p command , As mentioned above , Initial password none , direct enter;
Set up root Initial password :
use mysql;
ALTER user 'root'@'localhost' IDENTIFIED BY ' New password ';
FLUSH PRIVILEGES;
Modified to complete , Check the user password :
select host,user,authentication_string from mysql.user;
sign out mysql: Input exit, sign out MySQL;
Here we are ,mysql The installation is over , You can log in and use normally mysql 了 .
Tips
mysqld –initialize-insecure Automatically generate no password root user ;
mysqld –initialize Automatically generate... With random password root user ;
mysqld -remove Remove your own mysqld service ;
net stop mysql command , stop it mysql service
If you make a mistake , Empty data Folder , It's better to delete data file , Re execution remove–initialize–install–start( These are not orders ) Just the process ;
版权声明
本文为[Jack_ joker]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220607497249.html
边栏推荐
- Supersocket is Used in net5 - command
- Unity games and related interview questions
- Super easy to use [general excel import function]
- The principle and solution of not allowing pasting in an English Network
- JS, bind the event for a label with input, and then bind the stand-alone event in the parent element. The event is executed twice and solved
- 淺學一下I/O流和File類文件操作
- Flink customizes the application of sink side sinkfunction
- Problem a: face recognition
- Basic use of Charles
- 集合之List接口
猜你喜欢

Unity basics 2

Using swagger in. Net5

Unity knowledge points (ugui 2)

Design and implementation of redis (3): persistence strategy RDB, AOF

浅学一下I/O流和File类文件操作

Visual programming - drawing assignment

Download and configuration of idea

QT learning summary

IDEA查看历史记录【文件历史和项目历史】

Utgard connection opcserver reported an error caused by: org jinterop. dcom. common. JIRuntimeException: Access is denied. [0x800
随机推荐
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]
关于idea调试模式下启动特别慢的优化
Un aperçu des flux d'E / s et des opérations de fichiers de classe de fichiers
Section 1 array and slicing in Chapter 6
JS calculates the display date according to the time
超好用的Excel异步导出功能
第四次作业
Using swagger in. Net5
Using jsonserialize to realize data type conversion gracefully
Codeforces round 784 (Div. 4) (AK CF (XD) for the first time)
What to pay attention to when writing the first code
2022 团体程序设计天梯赛 模拟赛 L2-1 盲盒包装流水线 (25 分)
Problem C: realize Joseph Ring with linked list
Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
On the principle of concurrent programming and the art of notify / Park
. net 5 Web custom middleware implementation returns the default picture
Can you answer the questions that cannot be answered with a monthly salary of 10k-20k?
MySQL索引详解【B+Tree索引、哈希索引、全文索引、覆盖索引】
淺學一下I/O流和File類文件操作
Visual programming -- how to customize the mouse cursor