Install mysql-8.0.11-Winx64 on Windows

  • First unzip the downloaded compressed version, using the community open source version can be found on the official website
  • Configure the bin file directory of mysql in the path variable of the system environment.
  • Use CMD to open the command window and enter mysqld –initialize command to initialize the mysql data directory. Remember that after initialization, a data folder will be generated in the decompress directory. In this folder there will be a file ending with. You can also use the mysqld –initialize –console command, which generates a random password that appears in the DOS window.

The initial password is in the password keyword of the. Err file in the data directory

  • Create a my.ini file
[mysql] ; Mysql client default character set default-character-set=utf8 [mysqld]; Set port 3306 to 3306. Basedir =E:\application\mysql; Datadir =E:\application\mysql\data; Max_connections =200; The default character set used by the server is 8 bits latin1 character set character-set-server= UTF8; The default storage engine that will be used when creating new tables is default-storage-engine=INNODBCopy the code
  • Type mysqld –install to install mysql services.
  • Net start mysql is used to start the mysql service.
  • Log in and change the password mysql -u root -p
  • The password is the random password that was just generated in the.err record
  • ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘newpassword’; ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘newpassword’;