I get this error and I’m not able to start the MySQL server. ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
I followed this guide here https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-socket-errors-in-mysql
But I found that I don’t even have the /var/run/mysqld/ directory When I try to cd or ls that directory, it shows the directory does not exist.
I guess my own case is different, I browsed around the internet and found this solution that suggested I add
innodb_force_recovery = 6
After adding that code, it still does not solve the problem
When I go into the /var/log/mysql/error.log file I get this
2022-08-08T01:40:28.108418Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-0ubuntu0.20.04.2) (Ubuntu). 2022-08-08T01:40:28.677008Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30-0ubuntu0.20.04.2) starting as process 271100 2022-08-08T01:40:28.688821Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-08-08T01:40:28.928619Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2022-08-08T01:40:29.023994Z 1 [Warning] [MY-011018] [InnoDB] Skip updating information_schema metadata in InnoDB read-only mode. 2022-08-08T01:40:29.229659Z 1 [Warning] [MY-010005] [Server] Skip re-populating collations and character sets tables in InnoDB read-only mode. 2022-08-08T01:40:29.235974Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-08-08T01:40:29.236037Z 0 [ERROR] [MY-010119] [Server] Aborting 2022-08-08T01:40:29.760446Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-0ubuntu0.20.04.2) (Ubuntu).
I would appreciate any help I can get regarding this, thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.