What should I do if the mysql window service cannot be started?
藏色散人
Release: 2021-12-29 11:31:21
Original
15292 people have browsed it
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.
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
2. Find the mysql installation directory and move its configuration file my.ini to the bin directory.
3. Enter the bin directory in command line mode with administrator rights.
#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.
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.
6. Finally, enter mysql -uroot -p on the command line and use the previous temporary password to log in to the database successfully.
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.
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!
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