当前位置:网站首页>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
边栏推荐
- [microservices] (x) -- Unified gateway
- JS implementation of new
- POI create and export Excel based on data
- WinForm allows the form form to switch between the front and active states
- Applet - canvas drawing Poster
- Section 2 map and structure in Chapter 6
- MySQL grouping query rules
- 超好用的【通用Excel导入功能】
- MySQL索引详解【B+Tree索引、哈希索引、全文索引、覆盖索引】
- Visual programming - drawing assignment
猜你喜欢

Unity games and related interview questions

移植tslib时ts_setup: No such file or directory、ts_open: No such file or director

Quartz. Www. 18fu Used in net core

JS inheritance

TCP three handshakes and four waves

MySQL keyword group_ Concat, combined connection query

【微服务】(十)—— 统一网关Gateway

Redis(17) -- Redis缓存相关问题解决

Test questions and some space wars

AWS from entry to actual combat: creating accounts
随机推荐
Commonly used classes
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]
Idempotency practice operation, explaining idempotency based on business
Using jsonserialize to realize data type conversion gracefully
Scenario Title: how does system a use the page of system B
Learn about I / O flow and file operations
批量下载文件----压缩后再下载
幂等性实践操作,基于业务讲解幂等性
Design and implementation of redis (4): what is the event driver of redis
Advanced sorting - fast sorting
A hundred dollars for a hundred chickens
7-3 poly width
MySql关键字GROUP_CONCAT,组合连接查询
Un aperçu des flux d'E / s et des opérations de fichiers de classe de fichiers
Unity basics 2
数据库表中不建索引,在插入数据时,通过sql语句防止重复添加(转载)
Test questions and some space wars
Section 1 array and slicing in Chapter 6
Visual programming - Experiment 1
Test questions (2)