[Java development environment configuration] install MySQL

[Java development environment configuration] install MySQL

Take mysql-5.6.40 as an example, more versions can be downloaded from the official website
or in my resources.
Official website: MySQL official website

Link: More detailed download steps, you can refer back to my article after the next

1. Unzip "mysql-5.6.40-winx64", and copy the resulting directory to a path that does not contain Chinese.

Insert picture description here

2. Configure the environment variables of mysql. Add a new line in the path variable, as shown below.

Insert picture description here

3. Modify the mysql configuration file

Open the unzipped folder of mysql, copy the original my-default.ini file and rename it to my.ini

Open the my.ini configuration file and modify the content of the file, adding four sentences:

Insert picture description here
Insert picture description here

4. Run cmd as an administrator

Insert picture description here

5. Enter the bin directory under the mysql installation directory

Execute each command in the following figure. Note that when you execute "mysql -uroot -p" for the first time, you do not need to enter a password. Then reset the password after booting:
Insert picture description here

6. The installation is now complete. Common mysql commands (the service is MySQL if installed by default):

Installation service: mysqld --install [service name]

Remove service: mysqld --remove [service name]

Start the service: net start [service name]

Stop the service: net stop [service name]

name]

Start the service: net start [service name]

Stop the service: net stop [service name]

Guess you like

Origin blog.csdn.net/hkdhkdhkd/article/details/110110306