MySQL 5.7 installation
The school was learning MySQL database. The teacher asked us to install it by ourselves. We thought it could be done quickly, but we spent the whole night. We were really annoyed. We recorded how to install it and how to solve some problems.
1. Download:https://dev.mysql.com/downloads/mysql/
Download and unzip it to your favorite location. The path is in English (for example, I directly unzip to e: MySQL)
2. Edit one my.ini text
[mysqld]
port = 3306
#The path of mysql-5.7.27-winx64
basedir=E:\mysql
#MySQL path
datadir=E:\mysql\data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8
Put it in the decompressed path
(cannot be written my.ini Configuration, can be written in Notepad + +, download address: https://notepad-plus-plus.org/downloads/v7.7.1/
3. Add environment variables
Variable name: MySQL_ HOME
Variable value: MySQL unzip directory, for example, my time e: MySQL
Add path
%MYSQL_HOME%\bin;
Right click this computer point properties, and then proceed to the following operations
Add path
Add% MySQL_ Home% \ bin; then make sure to save.
4. Open the command prompt as an administratorWin10 searches for CMD in the lower left corner of the status bar, and then right-click to run as an administrator
Note: if you have previously installed MySQL but failed, delete the MySQL service completely before you proceed with the next operation, ignore it for the first time, and look at (1) directly. This is where I spent the whole night. Methods: * 1. Start task manager > Service > Open Service > MySQL > right click to stop running
*2. Search for “regedit” in the lower left corner of the status bar, open the following in turn and find mysql
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
Right click to delete mysql. *3. Open the CMD command window with administrator permission, and then enter the command: SC delete MySQL enter in the CMD command.
(1) Initialization:mysqld -initialize-insecure
(2) Install: mysqld install prompts install / Remove of the Service denied, indicating that the command prompt entered by the administrator is not in the way of an administrator. Enter again as an administrator. If service successfully installed is prompted, the installation is successful. The prompt “service successfully exists!” indicates that it has been installed before. If there is a problem in the next step 4, go back to the previous onebe carefulThat’s the matter.
(3) Start the service net start mysql. If the service fails to start, enter:mysqld --initialize-insecure
It’s a little long. It’s going to take a while.
(4) Landingmysql -u root -p
Enter password will appear: at this time, we will enter directly
Enter: use Mysql to enter the database input: update user set authentication_ String = password (“XXXXXX”) where user = root; XXXXXX is the new password you set. Click enter to display query OK, indicating that you need to enter the password you set when you log in again. (5) Enter select now() and enter to display the time of your computer.
(6) Enter quit
(7) Enter net stop Mysql to stop the service.
summary
The above is a brief introduction of MySQL 5.7.27-winx64 win10 download and installation tutorial diagram, I hope to help you, if you have any questions, please leave me a message, the editor will reply to you in time. Thank you very much for your support to the developeppaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!