Detailed tutorial on installing mysql under win10
**
1. Download mysql
-
Open the official website of mysql in the browser http://www.mysql.com/
-
Go to "Downloads" at the top of the page
-
Open "Community(GPL) Downloads" at the bottom of the page
-
In the middle of the page, find the download page "MySQL on Windows (Installer & Tools)" we want to use on windows
-
Select the first item "MySQL Installer"
-
Find the download entry "Windows (x86, 32-bit), MSI Installer" at the bottom of the page, click the Download button to start downloading, a total of 381.4M Note
: MSI format refers to the Windows installer, after downloading, you can directly double-click to enter the installation wizard, which is different from the installation method of decompressing the file; -
This page tells you whether to log in, and tells you the benefits of logging in. If we don't log in, click the "No thanks, just start my download." button at the bottom of the page to enter the download page
-
Start the download and wait for the download to complete (because the direct download speed is too slow, I downloaded it with Thunder later)
-
Download completed
Two, install mysql
-
Double-click the downloaded mysql installation file "mysql-installer-community-5.7.14.0.msi" to open the installer, you need to wait a while after opening
-
Choose the type of installation (according to personal needs)
-
I just need to install mysql server, so select the last item "Custom". After selecting Custom, the installation process on the left and the description text on the right will change, and then click the "Next" button to continue
-
Here we need to select the mysql server we need from the installable products (Products) provided by the installer
We expand the first item "MySQL Servers" in Available Products, and expand its sub-nodes in turn until its terminal node. My operation is 64-bit, so select "MySQL Server 5.7.14 - X64"
Then click the green right arrow to move the current Product to the list that needs to be installed, then expand the "MySQL Server 5.7.14 - X64" item on the right, uncheck "Development Components" (because we only need to install mysql server), and then click the "Next" button to enter the next step
-
Click "Execute" to start the installation. During the installation process, the progress of the installation will be displayed. After the installation is complete, the Status will display Complete. There will be a green tick in front of the mysql icon, and then click the "Next" button to enter the product configuration interface
-
Click the "Next" button to enter the MySQL Server configuration
Select "Development Machine" for Config Type. Selecting this item will use smaller content to run our mysql server, which is completely sufficient for small software and learning. After "Next"
Set the password of the root account of the database in Root Account Password. I filled in 123456, so the program reminds me that the password strength is weak. We need to keep this password in mind, and then click "Next"
Here you can set the name of the mysql server and whether to start it at startup. I changed the name to "MySQLZzz1", canceled the startup, and left the rest unchanged. Click "Next"
Click "Next"
This interface applies the previously set configuration content to our mysql server, click "Execute", and wait for the completion
The configuration is complete, click "Finish" to complete the configuration link
- After the configuration is complete, it will return to the installer, we click "Next" to continue
Prompt us that the installation is complete, click "Finish"
- After clicking "Finish" in the previous step, the computer is so quiet that people don't know what to do next! According to the experience of installing software in the past, the computer should automatically start the software just installed at this time. So I searched in the process, and I did not find a process similar to mysql, so let's go to the next step.
3. Configure mysql environment variables (not necessary)
Description: After configuring environment variables for mysql, we can run mysql in cmd (open, stop, etc.)
- In the same way as the actual environment variable configuration method, we open the environment variable configuration window (key combination win+Pause -> change settings -> select "Advanced" -> environment variables in the system properties)
- Select "path" in the system variable, enter the path of the bin folder under the mysql installation directory at the beginning of the path value: C:\Program Files\MySQL\MySQL Server 5.7\bin, save and exit Note: The default path for mysql server installation is: C:\Program Files\MySQL\MySQL Server
5.7 - Test whether the configuration is successful: open cmd, enter "mysql -u root -p" and press Enter, and then enter the password of the root account (123456) set during mysql installation. If the prompt "Welcome to the MySQL monitor." indicates that the configuration is successful.
Four, start mysql
Yep, we haven't started our mysql yet! So how to start it?
(based on configured environment variables)
-
Run cmd as an administrator, and enter "net start mysqlzzz1" (MySQLZzz1 is the server name filled in when configuring the mysql server, and it can also be used in cmd without case sensitivity)
-
After the prompt starts successfully, we can see the process of "mysqld.exe" in the process of the task manager.
Attachment:
If the command is executed, it prompts: The service name is invalid. Please type NET HELPMSG 2185 for more help.
Solution: Execute the mysqld -install command with administrator privileges in the mysql bin directory.
The method of uninstalling the mysql service is attached.
1. Net stop mysql with administrator privileges to close the mysql service
2. Mysqld -remove with administrator privileges to uninstall the mysql service
5. Test whether the installation is successful
We use the MySQL management software (Navicat for MySQL) to conduct a connection test to ensure that mysql is ready to use:
-
Open Navicat for MySQL
-
Create a new connection and fill in the connection information:
Connection name: used to distinguish different connections, you can name it yourself
Host name: localhost
Port: 3306
User name: root
Password: 123456 (password filled in when configuring mysql before) -
Click the "Connection Test" button, and a dialog box of successful connection will pop up, indicating that the mysql server has been started
-
After that is the use of Navicat for MySQL software
Another:
We can also enter "net start mysqlzzz1" again in cmd, if it prompts "The requested service has been started." It means that the mysql server has started normally;
So far, the mysql server has been installed on Windows 10 64-bit.
————————————————
Copyright statement: This article is an original article of CSDN blogger "They call me Zhou Zhouzhou", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprinting.
Original link: https://blog.csdn.net/zhouzezhou/article/details/52446608