Issue
I have had the problem in XAMPP for a long time that MySQL starts but stops after a short time. I reinstalled XAMPP twice because of this error. After the last reinstallation, I finally had hope that it would work now. It has worked for about a week now and the same error has appeared today. I could now find out that MySQL can be started automatically by opening XAMPP with administrator rights and entering the command mysqld --skip-grant-tables
in the XAMPP Shell. The command actually only stops the tables for phpmyadmin. It could be that there is an error with the table. I then installed MySQL as a Windows service for testing purposes and had to find out that MySQL can be started without problems / command input. However, if you want to call phpmyadmin, an error message appears on phpmyadmin and MySQL stops automatically. Maybe someone has a solution to the problem?
The phpmyadmin Error Message:
The connection could not be established due to invalid settings.
mysqli :: real_connect (): (HY000 / 2002): A connection could not be established because the target computer refused to connect.
Connection for the control user, as specified in your configuration, has failed.
mysqli :: real_connect (): (HY000 / 2002): A connection could not be established because the target computer refused to connect.
phpMyAdmin tried to connect to the MySQL server and the connection was rejected. You should check your host, user name and password settings in your config.inc.php and make sure that they correspond to the information you received from the administrator.
Solution
I think I could find the bug. As I suspected, it is probably due to a broken table. Have now checked the XAMPP Error Log again and found the following error there.
2020-06-30 16:06:09 0 [ERROR] mysqld.exe: Table '. \ Mysql \ db' is marked as crashed and last (automatic?) Repair failed
2020-06-30 16:06:09 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table '. \ Mysql \ db' is marked as crashed and last (automatic?) Repair failed
2020-06-30 16:06:09 0 [ERROR] aborting
Means you have to repair the table. Just checked again. I think this post could fix the problem.
Answered By - Luca_54
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.