mysql-5.7.27 installation net start mysql system error occurred 2 system can not find the file specified

Transfer: https://www.jianshu.com/p/6d8ed7c36e6f

Run as administrator, the installation path at the command line, type cd + mySQL's bin directory

C:\Windows\system32>cd C:\Program Files\MySQL\MySQL Server5.6\bin

C:\Program Files\MySQL\MySQL Server5.6\bin>mysqld --remove

Service successfully removed.

C:\Program Files\MySQL\MySQL Server5.6\bin>mysqld --install

Service successfully installed.

C:\Program Files\MySQL\MySQL Server5.6\bin>net start mysql

MySQL service is starting.

MySQL service has started successfully.

 

======================

There are many online installation process, but not be caused by environmental or version of the problem, the installation process encountered some problems, the ultimate success of the installation, record your own installation process, see if they have not stepped on a pit with the

 

The first is my environment: windows10,64 bit mysql version 5.7.27

1 "unzip package downloaded mysql5.7.27

https://dev.mysql.com/downloads/mysql/, select Windows x86,64-bit ZIP Archive 5.7.27

(Change it, this is the default URL to download mysql8.0 version provides additional address here as a direct download mysql5.7.27

https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.27-winx64.zip)

2 "extract to your installation folder, I have here is D: \ appinstall \ mysql-5.7.27

3 "configure the environment variables: Path system environment variable added to the D: \ appinstall \ mysql-5.7.27 \ bin

4 "mysql is not configured in the my.ini 5.7 or later unzip files and data folders

Create your own my.ini file, as follows:

[mysqld]

Port = 3306

the basedir = D: \ appinstall \-MySQL 5.7.27 \ bin
DATADIR = D: \ appinstall \-MySQL 5.7.27 \ Data

max_connections = 200 is

Character-SET = UTF8 Server-

default-Storage-Engine = INNODB

sql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES

explicit_defaults_for_timestamp = to true

[MySQL]

default-Character-the SET utf8 =
5 "Next is the data folder, a folder beginning note data is not, nor can manually create your own

Open cmd, run with administrator privileges, enter the mysql installation directory: D: \ appinstall \ mysql-5.7.27 \ bin

Run the command: mysqld --initialize (this time will generate data directory)

After performing normal is nothing output, if there is an error, check that there is already a data folder is not between, have to manually delete and re-execute the command

6 "Run mysqld -install (installation)

7 "Run net start mysql (start mysql service)

After running I have here is this:

MySQL service is starting.
MySQL service failed to start.
The service did not report any errors.
Type NET HELPMSG 3534 to get more help.
After finally found the problem data folder, re-create just fine

Rerun the command to start mysql service

8 "set the root account password:

In my.ini file (MySQL configuration file) [mysqld] add a line skip-grant-tables

Then restart the MySQL service in the Task Manager

 After the restart MqSQL service, run mysql -uroot -p, you can successfully logged in mysql

And then update the root account password for 'root'

命令:update mysql.user set authentication_string=password("root") where user="root";

Then enter flush privileges; (refresh account information)

The quit or ctrl + C to exit

Then my.ini file just add the skip-grant-tables to delete this line, save and then restart the MySQL service

 

 

Finally, whether through command navicat also can connect via a local database root / root

 

 

Add that after today installed on a brand new windows7 reported the following error:

mysql After installing the first time you log report ERROR 1862 (HY000) 
 

The reason: MySQL password expiration is set to Y

Solution: change the password_expired not expire

Reference: HTTPS: //blog.csdn.net/shilukun/article/details/82663362
----------------
Disclaimer: This article is the original article CSDN blogger "wangtaojiushiwo", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/wangtaojiushiwo/article/details/100729336

Transfer: https://www.jianshu.com/p/6d8ed7c36e6f

Run as administrator, the installation path at the command line, type cd + mySQL's bin directory

C:\Windows\system32>cd C:\Program Files\MySQL\MySQL Server5.6\bin

C:\Program Files\MySQL\MySQL Server5.6\bin>mysqld --remove

Service successfully removed.

C:\Program Files\MySQL\MySQL Server5.6\bin>mysqld --install

Service successfully installed.

C:\Program Files\MySQL\MySQL Server5.6\bin>net start mysql

MySQL service is starting.

MySQL service has started successfully.

 

======================

There are many online installation process, but not be caused by environmental or version of the problem, the installation process encountered some problems, the ultimate success of the installation, record your own installation process, see if they have not stepped on a pit with the

 

The first is my environment: windows10,64 bit mysql version 5.7.27

1 "unzip package downloaded mysql5.7.27

https://dev.mysql.com/downloads/mysql/, select Windows x86,64-bit ZIP Archive 5.7.27

(Change it, this is the default URL to download mysql8.0 version provides additional address here as a direct download mysql5.7.27

https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.27-winx64.zip)

2 "extract to your installation folder, I have here is D: \ appinstall \ mysql-5.7.27

3 "configure the environment variables: Path system environment variable added to the D: \ appinstall \ mysql-5.7.27 \ bin

4 "mysql is not configured in the my.ini 5.7 or later unzip files and data folders

Create your own my.ini file, as follows:

[mysqld]

Port = 3306

the basedir = D: \ appinstall \-MySQL 5.7.27 \ bin
DATADIR = D: \ appinstall \-MySQL 5.7.27 \ Data

max_connections = 200 is

Character-SET = UTF8 Server-

default-Storage-Engine = INNODB

sql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES

explicit_defaults_for_timestamp = to true

[MySQL]

default-Character-the SET utf8 =
5 "Next is the data folder, a folder beginning note data is not, nor can manually create your own

Open cmd, run with administrator privileges, enter the mysql installation directory: D: \ appinstall \ mysql-5.7.27 \ bin

Run the command: mysqld --initialize (this time will generate data directory)

After performing normal is nothing output, if there is an error, check that there is already a data folder is not between, have to manually delete and re-execute the command

6 "Run mysqld -install (installation)

7 "Run net start mysql (start mysql service)

After running I have here is this:

MySQL service is starting.
MySQL service failed to start.
The service did not report any errors.
Type NET HELPMSG 3534 to get more help.
After finally found the problem data folder, re-create just fine

Rerun the command to start mysql service

8 "set the root account password:

In my.ini file (MySQL configuration file) [mysqld] add a line skip-grant-tables

Then restart the MySQL service in the Task Manager

 After the restart MqSQL service, run mysql -uroot -p, you can successfully logged in mysql

And then update the root account password for 'root'

命令:update mysql.user set authentication_string=password("root") where user="root";

Then enter flush privileges; (refresh account information)

The quit or ctrl + C to exit

Then my.ini file just add the skip-grant-tables to delete this line, save and then restart the MySQL service

 

 

Finally, whether through command navicat also can connect via a local database root / root

 

 

Add that after today installed on a brand new windows7 reported the following error:

mysql After installing the first time you log report ERROR 1862 (HY000) 
 

The reason: MySQL password expiration is set to Y

Solution: change the password_expired not expire

Reference: HTTPS: //blog.csdn.net/shilukun/article/details/82663362
----------------
Disclaimer: This article is the original article CSDN blogger "wangtaojiushiwo", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/wangtaojiushiwo/article/details/100729336

Guess you like

Origin www.cnblogs.com/albert-think/p/11611660.html