1. First download MySQL The version I selected is 5.7.19 based on the 64-bit Windows operating system. MySQL Portal: https://dev.mysql.com/downloads/mysql/There are different operating systems installed in the installation package you need to download it yourself.
The specific installation is as follows:
1, unzip the Mysql-8.10-winx64zip compressed file to the D:\application\mysql directory;
2, in the D:\application\mysql directory to create a new my.ini configuration file;
3. Open the My.ini file with a text editor or other editor, copy and paste the following code, and save the exit;
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\application\mysql
# Set up a storage directory for MySQL database data
Datadir=d:\application\mysql\\data
# Maximum number of connections allowed
max_connections=200
# The default character set used by the server is UTF8
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
4.1, the new system variable and the configuration variable value is D:\application\mysql;
Run command prompt cmd as Administrator (be sure to run as administrator, or not enough) input: MySQLd--initalize (mysql5.7 above must first run the change command)
Using DOS instructions, go to the D:\application\mysql directory and run the following command: myqld install
Start MySQL service: net start MySQL shutdown MySQL service: net stop MySQL
To set the root password for MySQL, run the following command : Mysql-u root-p
This will cause an error, because the MySQL password needs to be reset:
Workaround: Locate the Mysql.ini file and add the following code on the last line:skip-grant-tables and then close the MySQL service!
Then turn on the MySQL service.
At this point, the Mysql 8.0 winx64 Release configuration installation is complete!
To be continued .....
Python Operation MySQL Database series-Install MySQL database