Some time ago, MySQL was installed smoothly, and soon it was installed. After simple configuration, enter the MySQL console, enter the password, and then enter the working status smoothly.
However, when I enter the MySQL console the next day and enter the password, the entire console disappears. the problem persists after several retries. I went online to Baidu and found that many people encountered the same problem. ini configuration error. INI according to the changes on the Internet, and then restart the service, the result is still not OK. so there is no way to reinstall it. re-install, but it cannot be completed after the last step of configuration (because the service is started at that step, the service cannot be started at all times ). go online again. finally find a solution to the problem:
First, let's take a look at the MySQL service parameters and the location of the configuration file used. my version is in the installation directory. open my. INI find datadir, and then open this path to delete MySQL files and folders. then reinstall and solve the problem.
But later I found the same problem, and it cannot be solved by using the previous method, that is, deleting the corresponding file and folder, and then re-installing. we use another method: After the installation is completeBack up my. ini and restore my. ini when the service cannot be started.
An error occurred. I found that I dropped database MySQL every time to test the MySQL database. At this time, I stopped the service and started the service again. therefore, it is very important that you cannot delete this database.
Of course, if you delete the data directory by mistake, follow the instructions above to delete the data directory And then reinstall it.