The solution to the problem that mysql cannot be connected is for your reference. The specific contents are as follows It worked fine yesterday, but the next day it suddenly couldn't connect to the MySQL database and reported an error: After careful consideration, it is very likely that the table was damaged because some data in the MySQL built-in table was accidentally deleted. Oracle was also damaged before..... So don't delete the system table information casually Enter the service, find mysql, and find that the service has stopped. Restart the service and find that it cannot be restarted, as follows Unable to restart, report 1067 And it is not possible to enter msyql in the dos command Then I checked the system log information in the transaction manager and found that mysql had an error, as follows There are two error messages: 1. Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 2. Can't open the mysql.plugin table. Please run mysql_upgrade to create it. I found many solutions online but none of them worked. I was ready to reinstall MySQL, but I was thinking about what to do with the previous database. I also looked up how to import the previous database data, but it was not easy to do and I didn't find a way. However, when I was about to reinstall, I found a solution, as follows: 1. Find the original installation package, double-click it, select repair, and repair the service. 2. After the repair was completed, a miracle happened and the MySQL service was actually running 3. At this time, open navicat to connect and an error is displayed Access denied for user 'root'@'localhost' (using password: YES) The solution to this problem is everywhere on the Internet. I will provide you with a solution: When developing a web project in MyEclipse these two days, a problem occurred when connecting to the MYSQL database: Access denied for user 'root'@'localhost'(using password:YES). After searching for information, I found that the root account does not have remote access permissions by default, so the relevant permissions need to be modified. Solution: 1. Open the my.ini file in the MySQL directory, add a line "skip-grant-tables" at the end of the file, save and close the file. (WIN7 default installation, my.ini is in C:\ProgramData\MySQL\MySQL Server 5.6) After completing the above steps, MyEclipse can successfully connect to MySQL. Thank you for this netizen's solution. At this point the problem has been solved and I feel much better. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Implementation of formatting partitions and mounting in Centos7
>>: Introducing icons by implementing custom components based on Vue
The MySQL development team officially released th...
1. Check whether MySQL is installed yum list inst...
Export a single table mysqldump -u user -p dbname...
Preface An index is a data structure that sorts o...
Installing Electron cnpm install electron -g Inst...
Table of contents cache Cache location classifica...
After Ubuntu 20.04 is installed, there is no root...
Table of contents 1. Introduction 2. Recursion 3....
1. Implementation principle of scrolling The scro...
Today I recommend such an open source tool for ex...
Preface I recently learned Linux, and then change...
This article explains the difference between arro...
Start the mysql container in docekr Use command: ...
Preface Sometimes you need to keep the height of ...
This article mainly introduces how to evenly dist...