当前位置:网站首页>Install MySQL from scratch (MySQL installation document - unzipped version)
Install MySQL from scratch (MySQL installation document - unzipped version)
2022-07-29 06:19:00 【Programming sail】
Installation environment :Win10 64 position Software version :MySQL 5.7.24 Decompression version
MYSQL I have already placed the compressed package of , If the official website is slow to download, you can come to official account Xiao Jin's programming journey reply mysql Get it oh
One 、 download
Click the link below : https://downloads.mysql.com/archives/community/ Select the version corresponding to the number of digits in your system and click on the right Download, It will go to another page , Also find the position shown below near the bottom of the page :
Ignore the login and registration buttons above , Just click No thanks, just start my download. You can download .
Two 、 install ( decompression )
After downloading, we get a compressed package , Unzip it , We can get it MySQL 5.7.24 Software ontology ( It's a folder ), We can put it where you want to install it .
3、 ... and 、 To configure
- Add environment variables
There are many options in environment variables , Here we only use Path This parameter . Why add environment variables at the beginning of initialization ? In black box ( namely CMD) Enter the name of an executable program ,Windows Will be in the environment variable first Path Look in the path indicated , If you find it, execute it directly , Not found, just find it in the current working directory , If you haven't found it yet , Just report a mistake . The purpose of adding environment variables is to directly call... In any black box MySQL Instead of always modifying the working directory , Greatly simplified operation .
Right click this computer → attribute , Click Advanced System Settings Click environment variable
Create a new... In the system variable MYSQL_HOME
Locate and double-click in the system variable Path
Click New
Finally, click OK .
How to verify whether the addition is successful ?
Right click to start menu ( It's the lower left corner of the screen ), Select the command prompt ( Administrators ), Open the black box , Knock in mysql, enter . If you are prompted Can’t connect to MySQL server on 'localhost’ It proves that the addition is successful ; If you are prompted mysql Not an internal or external command , If it is not a runnable program or batch file, it indicates that the addition failed , Please recheck the steps and try again .
- New configuration file
Create a new text file , The contents are as follows :
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Save the above text file as , Select all files in the save type (.), File name my.ini, The storage path is MySQL Root directory ( For example, mine is D:\software\mysql-5.7.24-winx64, According to their own MySQL Directory location modification ).
The code means that the default code set of the configuration database is utf-8 And the default storage engine is INNODB.
3. initialization MySQL
Knock in the black box just now mysqld --initialize-insecure, enter , Wait a little bit , If there is no error message ( Here's the picture ) Then prove data There is no problem with directory initialization , Check again at this time MySQL There are already data Directory generation .
mysqld --initialize-insecure
tips: If the following error occurs
Due to insufficient permissions , Go to C:\Windows\System32 Run as administrator under cmd.exe
4. register MySQL service
Type in... In the black box mysqld -install, enter .
mysqld -install
Now your computer has been installed MySQL Yes .
MySQL The server
5. start-up MySQL service
Type in... In the black box net start mysql, enter .
net start mysql // start-up mysql service
net stop mysql // stop it mysql service
6. Modify default account password
Type in... In the black box mysqladmin -u root password 1234, there 1234 Default administrator ( namely root Account ) Password , It can be modified to what you like .
mysqladmin -u root password 1234
thus ,MySQL 5.7 The decompressed version has been installed !
Four 、 Sign in MySQL
Right click to start menu , Select the command prompt , Open the black box . Enter... In the black box ,mysql -uroot -p1234, enter , The following figure appears and the lower left corner is mysql>, Login succeeded .
mysql -uroot -p1234
Here you can start your MySQL On a journey !
sign out mysql:
exit
quit
Login parameters :
mysql -u user name -p password -h To connect the mysql Server's ip Address ( Default 127.0.0.1) -P Port number ( Default 3306)
5、 ... and 、 uninstall MySQL
If you want to uninstall MySQL, It's also very simple. .
Right click to start menu , Select the command prompt ( Administrators ), Open the black box .
Knock in net stop mysql, enter .
net stop mysql
Then knock in mysqld -remove mysql, enter .
mysqld -remove mysql
Finally delete MySQL Directory and related environment variables .
thus ,MySQL Uninstall completed !
For more exciting content, click follow , It's going to be a long time ~
Official account Xiao Jin's programming journey More programming resources are preferred ~
边栏推荐
- NoClassDefFoundError 处理
- Based on stc51: schematic diagram and source code of four axis flight control open source project (entry-level DIY)
- 进程与进程的概念
- Huawei cloud 14 days Hongmeng device development -day1 environment construction
- TB6600+stm32F407测试
- 关于【链式前向星】的自学理解
- 【软件工程之美 - 专栏笔记】26 | 持续交付:如何做到随时发布新版本到生产环境?
- 位运算学习笔记
- #9196 肿瘤面积 题解
- TLE5012b+STM32F103C8T6(bluepill)读取角度数据
猜你喜欢
shell工具finalShell
QT learning notes QT model/view
【RoboMaster】A板接收JY-ME01角度传感器数据--modebus协议&CRC软件校验
LeetCode #35.搜索插入位置
From entry to soul: how to use tb6600 single chip microcomputer to control stepping motor with high precision (42/57)
STM32FF030 替代国产单片机——DP32G030
Power electronics: single inverter design (matlab program +ad schematic diagram)
【软件工程之美 - 专栏笔记】30 | 用好源代码管理工具,让你的协作更高效
【软件工程之美 - 专栏笔记】16 | 怎样才能写好项目文档?
LeetCode #19.删除链表的倒数第N个结点
随机推荐
Logistic regression - project practice - credit card detection task (Part 2)
Jingwei Qili: development of heart rate and blood oxygen module based on hmep060 (1: FPGA sends multi bit instructions)
HR must ask questions - how to fight with HR (collected from FPGA Explorer)
【软件工程之美 - 专栏笔记】13 | 白天开会,加班写代码的节奏怎么破?
STM32FF030 替代国产单片机——DP32G030
PHY6252是一款超低功耗物联网蓝牙无线通信芯片
Ml4 self study notes
QT learning notes QT model/view
Ml8 self study notes LDA principle formula derivation
进程与进程的概念
Pit avoidance: about the interconnection of two hc-05 master-slave integrated Bluetooth modules, there is no connection problem
【软件工程之美 - 专栏笔记】23 | 架构师:不想当架构师的程序员不是好程序员
基于stm32的四针OLED显示
SimpleFOC调参2-速度、位置控制
SimpleFOC调参3-PID参数整定攻略
网络爬虫
LeetCode #876.链表的中间结点
Hal library learning notes-10 overview of Hal library peripheral driver framework
八大排序-----------快速排序
Hal library learning notes-14 ADC and DAC