当前位置:网站首页>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
边栏推荐
- Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
- poi根据数据创建导出excel
- Scenario Title: how does system a use the page of system B
- POI create and export Excel based on data
- The content of the website is prohibited from copying, pasting and saving as JS code
- Punch in: 4.23 C language chapter - (1) first knowledge of C language - (12) structure
- ThreadLocal test multithreaded variable instance
- 数据库表中不建索引,在插入数据时,通过sql语句防止重复添加(转载)
- When migrating tslib_ setup: No such file or directory、ts_ open: No such file or director
- 7-2 Tushare
猜你喜欢
Test questions and some space wars
New ORM framework -- Introduction to beetlsql
Visual programming - Experiment 1
淺學一下I/O流和File類文件操作
QT dynamic translation of Chinese and English languages
Development record of primary sensitive word detection
Section 1 array and slicing in Chapter 6
The art of concurrent programming (6): explain the principle of reentrantlock in detail
超好用的Excel异步导出功能
C set
随机推荐
Unity basics 2
Téléchargement en vrac de fichiers - téléchargement après compression
打卡:4.22 C语言篇 -(1)初识C语言 - (11)指针
QT learning summary
Three types of jump statements
Test questions (2)
Design and implementation of redis (4): what is the event driver of redis
Supersocket is Use in net5 - startup
MySQL索引详解【B+Tree索引、哈希索引、全文索引、覆盖索引】
C abstract class
Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD
MySQL query specifies that a row is sorted to the first row
打卡:4.23 C语言篇 -(1)初识C语言 - (12)结构体
PYMOL-note
批量下载文件----压缩后再下载
MySQL grouping query rules
Using swagger in. Net5
Create virtual machine
7-3 poly width
"Visual programming" test paper