Install mysql5.7.. on Windows 10 and forget to modify the root password, windows10mysql5.7.
Example: MySQL5.7.19Download
Of course, the first is to download the https://dev.mysql.com/downloads/mysql/ official website.
Select a version suitable for your computer, click Download, jump, and Download it directly without thanks.
Wait for the download and decompress the package. Here is my decompression path D: \ MySQL
Start Installation
: Windows 10
: MySQL5.7.19
Decompress the package
However, you can create one without my. ini. just create a text document and change the suffix to ini.
[Client] # Set port 3306 to port 3306 [mysqld] # Set port 3306 to port 3306 # Set your MySQL installation directory basedir = D: \ MySQL # Set the data storage directory of your MySQL database datadir = D: \ MySQL \ data # maximum number of connections max_connections = 200 # The default character set used by the server is the 8-bit latin1 character set character-set-server = utf8 # default storage used when creating a new table engine default-storage-engine = INNODBsql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [mysql] # set the default character set of the client default-character-set = utf8
The next step is to configure the environment variables.
This computer-> right-click, properties-> advanced system settings-> Environment Variables
Variable name: MYSQL_HOME
Variable value: installation path of MySQL
Next, add a Path and select "Path" to edit. Add one: % MYSQL_HOME % \ bin.
All the way.
To open a command prompt, you must have the Administrator permission. Otherwise, the permission is insufficient.
Cd/dD: \ MySQL \ bin to enter the bin directory. Enter the bin directory! Not written on the graph! Then, press the command in the figure.
Next, mysql-u root-p does not need a password to enter MySQL for the first time. Just press Enter. The password is required because I have installed it before.
Next, update the password.
MySQL5.7 has no PASSWORD field and has changed to authentication_string
SO:
Mysql> update mysql. user set anthentication_string = password ('your password') where user = 'root ';
Mysql> flush privileges; // refresh MySQL System Permissions
Mysql> quit;
The mysql-u root-p operation can be performed again.
Mysql> show databases;
You can also set up a MySQL GUI, such as SQLyog and Navicat.
Forgot root Password
The password may be forgotten after a long time.
See the graph.
First, stop the mysql service;
If it cannot be stopped:
Ctrlw.altw.delopen the task manager and upload the mysql.exe task in detail.
Enter the bin directory
Mysqld-nt -- skip-grant-tables
The command prompt cannot be used any more.
Open an administrator command prompt and enter mysql.