Home  >  Article  >  Database  >  Detailed installation tutorial for MySQL5.7.10 decompressed version

Detailed installation tutorial for MySQL5.7.10 decompressed version

黄舟
黄舟Original
2017-08-02 14:52:141366browse

When I recently set up a PHP development environment, I encountered a problem that I had not encountered before. The downloaded decompressed version of MySQL5.7.10 database found that there was no data folder during configuration. What should I do? After thinking about it for a long time, I finally solved it. Now I will introduce the method and hope it will be helpful to those in need.

Detailed installation tutorial for MySQL5.7.10 decompressed version

1. After downloading and decompressing, I found that there is no data folder. What should I do? I have checked a lot of posting methods online, but I still can’t understand them. New version It turns out that it has been changed and needs to be initialized. Here is a step-by-step guide.

Detailed installation tutorial for MySQL5.7.10 decompressed version

2. Create a new data folder.

Detailed installation tutorial for MySQL5.7.10 decompressed version

3. Open the configuration file my-default.ini and see that basedir and datadir are not opened. The previous There is #, and the path is also represented by "...".

Detailed installation tutorial for MySQL5.7.10 decompressed version


##4. Remove the ones in front of basedir and datadir

#basedir adds the MySQL decompression path;

datadir adds the MySQL data folder path.

Detailed installation tutorial for MySQL5.7.10 decompressed version


##5. The next step is to configure the environment variables , first copy the bin address: open the bin folder in the MySQL decompression folder, click the mouse on the address bar to select it, and copy the address (the purpose of this is to prevent typing errors and is convenient).

Detailed installation tutorial for MySQL5.7.10 decompressed version

6. Add the Path variable value to the bin path you just copied. The specific method is: Open the computer desktop: Computer —>Right-click->Advanced system settings->Advanced->Environment variables (N)->Modify Path; just paste the copied address bar to the end. (Note here that different paths are separated by English ";") OK, exit.

Detailed installation tutorial for MySQL5.7.10 decompressed version

Detailed installation tutorial for MySQL5.7.10 decompressed version

Detailed installation tutorial for MySQL5.7.10 decompressed version#7. Open the dos interface. The specific method is: enter cmd.exe at the beginning and press Enter.

Detailed installation tutorial for MySQL5.7.10 decompressed version

##8. This step is very important. To initialize MySQL, you need Enter the bin file in the MySQL decompression directory: The specific method is: Here is the path under the F drive as an example:

F:回车
F:cd phptools\MySQL\bin(回车)
F:\phptools\MySQL\bin>mysqld --initialize-insecure --user=mysql(回车,这一步就是初始化)

When Service successfully installed appears, it means that the MySQL service has been installed and is about to be started. .


9.1Detailed installation tutorial for MySQL5.7.10 decompressed versionStart MySQL and enter it in the previous F:\phptools\MySQL\bin>:

net start mysql;

appears : The MySQL service started successfully, indicating that the configuration is complete this time.

1Detailed installation tutorial for MySQL5.7.10 decompressed version10. The next step is to start the new version of MySQL. Open the dos interface and enter mysql -u root - p and then press Enter, you will be prompted to enter the password. If there is no password, press Enter.

1Detailed installation tutorial for MySQL5.7.10 decompressed version11. Check the version. At this point, MySQL5.7.10 is installed.

1Detailed installation tutorial for MySQL5.7.10 decompressed version

Note

The new version of MySQL does not have data, you need to add it yourself, this requires initialization.

The above is the detailed content of Detailed installation tutorial for MySQL5.7.10 decompressed version. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn