Home > Operation and Maintenance > Windows Operation and Maintenance > How to download the green version of Mysql5.7 under win10 and solve the error in the installation steps

How to download the green version of Mysql5.7 under win10 and solve the error in the installation steps

黄舟
Release: 2017-06-07 09:42:59
Original
2865 people have browsed it

Resources: Download the latest version of Mysql official website, you need to log in to your Oracle account

Installation steps:

Extraction: Unzip the compressed package to any English directory:

Configure environment variables: add D:/mysql57/bin to the path

Modify the configuration file: my.ini content

[client]
port=3311
[mysqld]
port=3311
basedir="D:/mysql57/"
datadir="D:/mysql57/data/"
[mysql]
default-character-set=utf8
character-set-server=utf8
default-storage-engine=MyISAM
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=512
query_cache_size=0
tmp_table_size=18M
thread_cache_size=8
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=35M
key_buffer_size=25M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
Copy after login

In the mysql installation directory, create a new txt file , the same name is my.ini (please distinguish the file name and extension correctly to avoid mistakes like my.ini.txt), copy the above content into it, and modify this place:

basedir: database installation Directory (unzip directory)
datadir: database directory, which can be in any location, usually in the installation directory (please create it manually if it does not exist)
port: port, default 3306, can be modified if there is a conflict (there are 2 in the file (please keep it consistent)

3. Specify the configuration file: mysqld --init-file=D:/mysql57/my.ini
4. Initialization (automatically generate a passwordless root user): mysqld --initialize-insecure
The following figure shows the contents of the data folder after successful execution. The absence of the mysql, performnace_schema, and sys folders indicates that the execution failed.

5. Register service: mysqld --install will generate a system service named MYSQL by default. If there are multiple mysqls in the system, the name will be the same. You can use mysqld --install "service name" to specify the service name
6. Start the service: net start MYSQL

Attach the command in the command line tool: Each time a command is specified, the following content will appear based on the result

Success: D:\mysql57\bin> ; (Return to the current directory)

Failed: 2017-04-12T13:33:41.285516Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting. (one of the cases) .

Solution: Check the file with the file suffix XX.err under the data file, open it with Notepad, and check the error content. Common mistakes: 1. The data directory does not exist (it needs to be created manually). 2.my.ini file format (must be ANSI. UTF8, gbk, etc. will not work). 3. The command line is not run with administrator privileges. 4. The command is not executed in the installation directory/bin directory (especially when there are multiple mysqls)
The following is the command line

Attachment: The result of correctly executing the command line. And related dos commands

cd..: Return to the upper-level path
D:: Enter other disks in the following directory.
cd [path]: Enter the next level directory/or the specified path (no upward access)

Microsoft Windows [版本 10.0.15063]
(c) 2017 Microsoft Corporation。保留所有权利。
C:\WINDOWS\system32>cd.. /*返回上一级目录*/
C:\Windows>cd.. /*返回上一级目录*/
C:\>d: /*切换到D盘*/
D:\>cd D:/mysql57/bin /*进入D盘下指定目录*/
D:\mysql57\bin>mysqld -init-file=D:/mysql57/my.ini
D:\mysql57\bin>mysqld -initialize-initialize-insecure

D:\mysql57\bin>mysqld --install
Service successfully installed.

D:\mysql57\bin>net start mysql
MySQL 服务正在启动 ..
MySQL 服务已经启动成功。

D:\mysql57\bin>
Copy after login

If you don’t care about the version, if you are too lazy to bother, you can choose to install the integrated environment with one click:

JTMz: JDK + Tomcat + MySQL5.5 environment integration tool
JSPStudy:JDK+tomcat+Apache+mysql5.5+php

The above is the detailed content of How to download the green version of Mysql5.7 under win10 and solve the error in the installation steps. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template