How to install and configure mysql5.7.19: graphic tutorial (win10), mysql5.7.19win10

Source: Internet
Author: User

How to install and configure mysql5.7.19: graphic tutorial (win10), mysql5.7.19win10

Download and install MYSQL in WIN10 System

Two days ago, I encountered some dependency problems when I installed mysql In ubuntu. The problem was solved for a long time. I still broke my system, which is very destructive.

Up to now, I have not installed ubuntu and the computer driver problem. Lenovo Xiaomi 310 installed ubuntu as soon as it went in, and the card was suspended. But the system was installed for the second time, there were other minor actions in the middle. After the system was installed, the video card driver was disabled. We can only install win10 first, but there is another problem when installing Mysql in win10. It has been solved for a long time, so write a blog record.

This blog is also used to install MySQL in win10. What I installed is5.7.19Mysql.

Step 1:Download MySQL

: Https://dev.mysql.com/downloads/mysql/5.1.html#downloads

64-bit is downloaded when you are on your computer, and 32-bit is downloaded if you are on your computer.

My computer system is 64-bit, so I chose to download: Windows (x86, 64-bit) ZIP Archive version.

The specific process is as follows:

1. Select the download type, 64-bit or 32-bit:

Click download To Go To The download page. In this case, sign up is the most prominent one. Some people may feel that they need to register an account before downloading. Click the red icon in the figure and skip the registration. When downloading JDK and other things at ordinary times, you can also download them without registration.

OK. Wait until the download is complete.

2. Unzip and install Mysql5.7.19

(1) decompress the downloaded package to the specified path. You can specify the path. I directly decompress the package to drive D and decompress it to the Directory D: \ mysql5.7.19-winx64. The complete path of the Mysql package is:

D: \ mysql-5.7.19-winx64.

(2) Configure environment variables:

New system environment variables:

Key: MYSQL_HOME

Value: D: \ mysql-5.7.19-winx64

Add % MYSQL_HOME % \ bin in Path.

(Note: If you have not configured any environment variables, I would like to remind you not to delete anything, just add a semicolon after the original one, add the environment variable you want to configure)

The procedure is as follows: Right-click the computer and click Properties. Then select Advanced System settings ,:

Go to the following interface: Click environment variables ,:

Next, add the system environment variable. Click the create button at the bottom to bring up a box to create an environment variable, enter the environment variable name, and enter the environment variable path, you can also directly select the browsing directory.

:

Finally, add the new environment variable value to the environment variable: Click path at the top of the interface, and then click Edit. Then, click Edit to add and Add. Finally, click OK ,.


3. After completing the above steps, prepare the my. ini file.

I installed a previous version before, and after decompression, there will be a my-default.ini or my under the directory. INI file, but this file will not be taken after decompression after 5.7.18. In this case, we need to manually create my. the INI file is placed in the specified directory.

(1) create a text document (that is, open notepad) and change the name to my-default or my. Paste the following content into notepad.

[client]port=3306default-character-set=utf8[mysqld]port=3306character_set_server=utf8basedir=%MYSQL_HOME%datadir=%MYSQL_HOME%\data[WinMySQLAdmin]%MYSQL_HOME%\bin\mysqld.exe

(2) After completing the operation, we put it in the example, and its suffix is .txt. In this case, we need to modify the file suffix and change its suffix to. ini.

(3) After creating the my. ini file, copy and paste it to D: \ mysql-5.7.19-winx64 \ bin, and put it in the bin directory where mysql is located.

4. Run the command prompt as administrator. In win10, click Start, Enter cmd, right-click cmd, and select Run as administrator.

5. Switch the directory to the bin directory where the mysql package is located.Enter mysqld.exe-install

After the command is executed, the system prompts "Service successfully installed." indicates that the installation is successful.

However, in this step, I encountered the following problems: If you encounter this problem, don't be alarmed. the following solutions are available. If you have not encountered any problems, you can skip this step:

The reason why Mysql has been installed for so long in the morning is that, due to this problem, some junk solutions on the Internet mislead me and I have never been able to feel this problem, which is annoying.

The first solution found on the Internet is to download a MSVCR120.dll and put it under the directory of drive C windows and system32. Then I solved the problem. My classmate is a win7 system, she thought it was a problem. I could not solve it in win10. I also tried other methods and thought it was still a problem. I got stuck for a long time.

The following answer is preferable:

Haha, the version of vc ++ has been updated to version 2015, and the version number of msvcp files has been updated to version 140. Most of the solutions are still using the original copy products in an unknown age, it's 95 and Me again. Is there anyone using Windows 95? Do you dare to copy and paste it? Do you dare to modify the answer that I uploaded to my family for ten years plus Windows8.1 and Windows10?
It is strongly recommended that you reject all dll downloads and drops the file to the system disk, and then open cmd and use the regsvr command to register the file. This is a big hit.
Some people may find the above method useful and think I am alarmist. It's just that you're lucky. If the 64-bit system puts the dll file in syswow64 according to his statement, but the software or game you want to open is a 32-bit program, you can see if it is useful. Even if the version corresponds, you may not download this dll effectively, because you have not installed the vc ++ Runtime Library, and some software must be fully installed to run the VC ++ Runtime Library.

In addition:

Msvcp, msvcr, and vcomp140.dll belong to version VC ++ 2015.
Msvcp, msvcr, and vcomp120.dll belong to version VC ++ 2013.
Msvcp, msvcr, and vcomp110.dll belong to VC ++ 2012
Msvcp, msvcr, and vcomp100.dll belong to version VC ++ 2010.
Msvcp, msvcr, and vcomp90.dll belong to VC ++ 2008
Msvcp, msvcr60, 71, 80.dll, and vcomp. dll (without a digital version) belong to VC ++ 2005

In addition to errors such as loss and absence, if a program opens and prompts "parallel configuration error", it is also because the VC ++ Runtime Library is not installed.

In this case, you do not know which version to install. If it is too troublesome to try one by one, we suggest Baidu search DirectX Repair V3.5 enhanced version, this tool will install all versions of VC ++ runtime libraries while detecting and repairing DirectX, and also solve msvcp and other problems. Note: It must be an enhanced version. There is no VC ++ for the standard and online versions.

Because msvcr120.dll is missing, I downloaded Visual C ++ Redistributable Packages for Visual Studio 2013, which is a few megabytes. It is very small and can be installed after download.

: Https://www.microsoft.com/zh-cn/download/confirmation.aspx? Id = 40784

After the installation is successful, switch to the bin directory where the mysql package is located, enter mysqld-install, and press Enter.

You can see the prompt "Service successfully installed." (I was so excited at the time that I finally solved this problem. I felt like the solution I tried was too bad ).

6. initialize mysql Data and create a root user with an empty password. Open cmd and execute the following command:

Mysqld -- initialize-insecure -- user = mysql

Note: The final parameter -- user = mysql does not need to be added in windows, but it seems very important in unix and other systems.
After the command is executed, the system will automatically generate the corresponding data directory and automatically create a root user with a blank password. The initialization is successful.

7. In cmd, also known as a command prompt, enter the following command to start the mysql service.

Net start mysql
After the command is executed, the following message is displayed:
MySQL service is starting ..
The MySQL service has been started successfully.
Note: to log on to mysql, the service must be started first. The same will happen in the future

8. After the service is started, because the newly created root user has a blank password, you must first set the password.Run the following command:

Mysqladmin-u root-p password enter the new password here
Enter password: Enter the old password.

After the preceding two commands are executed, the new password of the root user is successfully set if Enter password: And the old password entered is correct. To log on to the root user, you must use the new password.
Note: The newly created root user has a blank password. Therefore, when you change the password of the root user for the first time, you can press Enter password: without entering any password.

9. Now, MySQL v5.7.18 has been decompressed and installed completely.Therefore, you need to stop the MySQL service that has been started earlier and execute the following command:
Net stop mysql

Log on to and use MySQL

The installation of the MySQL database has been completed. After the installation is successful, you can log on to the root user and perform data operations, such: create, add, delete, modify, and query tables. The following is a simple process:

1. Open cmd as an administrator and switch it to the bin directory of the mysql installation directory.

2. net start mysql // note: this command is used to start the mysql service.
Mysql-u root-p // Description: This command is used to log on to the root user.
Enter password: the password of the previously set root User

3. After correct logon, you can perform operations on the data, such as adding, deleting, modifying, and querying data. Example:
Mysql> show databases; // display all databases
Mysql> select statement ............
...

4. if you no longer use the database, log out of the user and stop the service. Run the following command: mysql> quit;

5. net stop mysql

Delete Database

If you no longer want to use mysql, run the following command: mysqld -- remove

I don't want to use the above command for control. We have other methods to use Mysql.

You can download and install navicat.

I don't have it here. I am Baidu's navicat. You can also use Baidu by yourself, but it will only bind a lot of rogue software. This requires you to be careful when installing it after downloading it, in the past, I used to like installation in a silly way. Once downloaded, I installed it with one click, so many rogue software will be installed. So after downloading it, the installation will proceed step by step, we can see that many rogue software are checked in front of the installation interface. We click to remove those checked items. Do not skip the steps. Each step is almost bound to a rogue software. we install it step by step, you can remove the check boxes step by step.

Then we can find the decompressed file folder, which contains a navicat icon, executable exe file, and directly create a desktop shortcut.

Open it on the desktop, and create a connection and database in it.

,

Create a connection, enter the root password, and set your own password.

Then you can use it: Click the connection you created, right-click it, and select open connection. You can right-click it and create a database ,, now everything has been done. Please use it.

Highlights: mysql installation tutorials for different versions mysql5.7 installation tutorials for various versions mysql5.6 installation tutorials

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.