Home >Database >Mysql Tutorial >What should I do if the mysql window service cannot be started?

What should I do if the mysql window service cannot be started?

藏色散人
藏色散人Original
2021-12-29 11:31:0215172browse

Solution to the problem that the mysql window service cannot be started: 1. Find the mysql installation directory and move its configuration file my.ini to the bin directory; 2. Enter the bin directory in command line mode with administrator rights Next; 3. Execute the "mysqld --initialize..." command.

What should I do if the mysql window service cannot be started?

The operating environment of this article: Windows 7 system, Mysql version 5.7, Dell G3 computer.

What should I do if the mysql window service cannot be started?

Solve the problem that Windows cannot start the MySQL service:

## 1. When starting the MySQL service, the dialog box shown in the figure below will appear

What should I do if the mysql window service cannot be started?

2. Find the mysql installation directory and move its configuration file my.ini to the bin directory.

What should I do if the mysql window service cannot be started?
What should I do if the mysql window service cannot be started?

3. Enter the bin directory in command line mode with administrator rights.

What should I do if the mysql window service cannot be started?

#4. Next, execute the command on the command line: mysqld --initialize --user=mysql --console. Note that this step will obtain a temporary password, which needs to be recorded and used later.

What should I do if the mysql window service cannot be started?

5. Next, enter: mysqld --install in command line mode to install the service. After the installation is complete, find "Services" in the task manager and start it. MySQL service is enough.

What should I do if the mysql window service cannot be started?

6. Finally, enter mysql -uroot -p on the command line and use the previous temporary password to log in to the database successfully.

What should I do if the mysql window service cannot be started?

7. If you want to change the password, enter mysqladmin -u root -p password root on the command line. The first root is the user name, and the second root is Just set the password yourself.

What should I do if the mysql window service cannot be started?

Recommended study: "

mysql video tutorial"

The above is the detailed content of What should I do if the mysql window service cannot be started?. 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