Building a Java Development Environment from scratch part 2: how to install MySQL in windows10
1 download installation package 1.1 zip package
Https://dev.mysql.com/downloads/mysql/
[external link image rollover failed (img-oesO8K09-1566652568838) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
1.2 installation package
No further steps are required to install using the installation package
Https://dev.mysql.com/downloads/file/?id=488055
[external link image rollover failed (img-Y3x59iO4-1566652568839) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
2 configure environment variables
[external link image transfer failed (img-RBgnyR9U-1566652568840) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
3 initialize MySQL
[external link image rollover failed (img-pVrsH1g4-1566652568841) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
Enter the command mysqld-- initialize-- user=mysql-- console under the MySQL path
[external link image transfer failed (img-4a4YX8nO-1566652568842) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
3.1 remember your initial password
[external link image transfer failed (img-IQFQj1kT-1566652568842) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
2019-08-24T11:55:10.299750Z 0 [System] [MY-013169] [Server] F:\ DEV\ env\ mysql-8.0.17-winx64\ bin\ mysqld.exe (mysqld 8.0.17) initializing of server in progress as process 27232 2019-08-24T11:55:10.355861Z 0 [Warning] [MY-013242] [Server]-character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2019-08-24T11:55:33.531673Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: KTX
2019-08-24T11:55:45.353166Z 0 [System] [MY-013170] [Server] F:\ DEV\ env\ mysql-8.0.17-winx64\ bin\ mysqld.exe (mysqld 8.0.17) initializing of server has completed
4 start the service
[external link image transfer failed (img-LVA4VR9p-1566652568842) (data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "Click and drag to move")]
Then enter mysqld-install to add the service, enter net start mysql to start the service, enter mysql-u root-p to log in to the database, then prompt for the need for a password, and then log in with your above password to change the password statement: ALTER USER root@localhost IDENTIFIED BY '123456login; change the password to: 123456
If the console is garbled, you can change the code to utf-8.
If you have problems with git bash, you can use cmd or powershell that comes with Windows.