Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql failed to start: how to solve the problem that the mysql service cannot be started

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "mysql startup failure: mysql service can not start how to solve", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "mysql startup failure: mysql service cannot start how to solve"!

MySQL server 8.0 failed to start after installation, with the following message: mysql service failed to start, service did not report any errors. What should we do at this time? Below is a small series to take you to understand the solution. Small partners in need can refer to the reference.

After installing My SQL server 8.0, it failed to start, and the prompt message is as follows:

Try the following steps to finally resolve the problem:

1 Check the host file (C:\Windows\System32\drivers\etc\hosts) to see if the local domain name has been modified. If the address corresponding to localhost has been modified, the connection to mysql server may fail.

Workaround: comment out the localhost mapping address

2 If there is no configuration file in mysql installation path (C:\Program Files\MySQL\MySQL Server 8.0), manually create one yourself, file name: my.ini, add the following content:

Note: the datadir attribute after the data folder, must not manually create their own, I try to manually create a problem, if you create it can be deleted, and then perform the following operations.

3 In mysql 5.7 and above, there is no data directory by default, that is, there is no initialization service. You need to initialize mysql before you can start the service, otherwise you will report that "the service did not report any errors" and the start will fail.

Solution:

a Enter the bin directory of mysql;

b Execute mysqld --initialize-insecure. If it is executed for the first time, it will take a long time. After the execution, there is no output information. Check the peer directory of bin and there will be an extra data folder with a pile of files in it.

4 Run the net start mysql command again to start the service and find that the startup is successful!

At this point, I believe that everyone has a deeper understanding of "mysql startup failure: mysql service cannot start how to solve", may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report