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

How to solve the problem of unable to start Mysql

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

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to solve the problem of unable to start Mysql, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Unable to start the solution for Mysql

Due to reporting all kinds of errors, today I mercilessly deleted MySql and Navicat and reinstalled them. After installation, if I want to enter mysql under CMD to be valid, I need to configure MySql environment variables under the system. My system is Win10, and the configuration is shown in the following figure.

(1) right-click on the computer-Properties-Advanced system Settings-Environment variables-Path

(2) Environment variable-- system variable Path-- new environment variable-- enter the bin path under the Mysql installation path

After configuration, start MySql or computer Management-Service through net start mysql under CMD, define it and start with MySql, but start to report the first error.

Find all kinds of solutions on the Internet, Get to a useful method, find the my.ini file in the installation directory of MySql, change default-storage-engine=INNODB to default-storage-engine=MYISAM, and restart to open MySql.

System error 5 occurred

Enter net start mysql to prompt system error 5 under CMD, which is caused by not logging in as an administrator. Right-click CMD to run as an administrator (you can right-click on the program without any effect, you can navigate to C:\ windows\ System32\ CMD and then right-click to run as an administrator.

Access denied for user 'root'@'localhost' (using password yes)

I thought that when MySql was started, I could connect to the database with Navicat. As a result, another error was reported. It is rather tedious to solve this error. The steps are as follows:

(1) stop the MySql service

Cmd:net stop mysql

(2) Open my.ini to find [mysqld] and add it below.

Skip_grant_tables-- means to skip authorization table authentication when starting the MySQL service

(3) start Mysql, type mysql to see the welcome English under cmd, and then enter the use mysql connection permissions database as shown below

(4) change the password

Update user set password=password ("123456") where user= "root"

(5) Refresh permission flush privileges

(6) quit quit at last

(7) remove the skip_grant_tables added in step 2 and restart MySql to be successful.

Thank you for reading this article carefully. I hope it will be helpful for everyone to share how to solve the problem of unable to start Mysql. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you 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