Home  >  Article  >  Database  >  MySql5.7.14 installation tutorial detailed explanation (unzipped version)_MySQL

MySql5.7.14 installation tutorial detailed explanation (unzipped version)_MySQL

WBOY
WBOYOriginal
2016-09-09 08:13:421086browse

Enter the official tutorial below:

Step 1: Download the latest MySQL file and unzip it:

Download the latest version of MySQL–mysql-5.7.12 download address

Extract the downloaded file to your favorite location, for example, my location is D:MySQLmysql-5.7.12-winx64

Step 2: Configure environment variables

Not much to say here, just configure the bin directory under the path.

Step 3: Add configuration file

Directly copy the my-default.ini file under the decompression path, rename it to my.ini and edit the file as follows:

<code class="hljs tex has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">
<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">[</span>mysqld<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">]
</span> 
basedir=D:<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\MySQL</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\mysql</span>-5.7.12-winx64<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\ </span>datadir=D:<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\MySQL</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\mysql</span>-5.7.12-winx64<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\data</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\ </span>port=3306</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li>
<li style="box-sizing: border-box; padding: 0px 5px;">2</li>
<li style="box-sizing: border-box; padding: 0px 5px;">3</li>
<li style="box-sizing: border-box; padding: 0px 5px;">4</li>
</ul>

There are two main issues that need to be noted here:

1. basedir is the decompression path of your mysql file above.

2. Create a new empty folder named data under the path, which is datadir.

Step 4: Initialize the database and configure the service

Before doing this step, you must pay attention to two issues! ! ! Remember! ! !

First: Open CMD as administrator;

Second: Use the cd command to enter the decompression path of your MySQL file!

Then execute mysqld --initialize --user=mysql --console

After successful execution, at the end of the printed text is the initial password of the database. Remember to copy it, select it with the mouse, press Enter and find a place to press ctrl+v.

After completing the above, open CMD as an administrator and execute it

mysqld --install MySQL –>添加到系统服务 
net start mysql –>启动mysql服务

Step 5: Change the initial password of mysql

1. Open CMD and execute: mysql -u root -p

2. Enter the initial password of the database you just saved.

3. Execute set password = password(‘***NewPassword***‘);

Just enter your own new password in the NewPassword position.

The above is the detailed explanation of the MySql5.7.14 installation tutorial (unzipped version) introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support of the 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