-->

DEVOPSZONES

  • Recent blogs

    SMT MySQL Error: Failed: Can't connect to local MySQL server through socket

    On one fine day someone reported that the SMT server is not able to get the repository catalogue.  While i checked i found that the queries are not being responded by the  DB. So, I've decided to do a service restart. As expected it did not completed within stipulated time. So what i did is that I've killed all the MySQL DB process.  Then the unexpected happened. The DB got crashed and did not came up. When i tried to start to start the DB i've been welcomed by the error that i've noted above.

    At first what i did is to run "mysqld_safe" to recover the database. That did not end up in a sweet note. But definitely gave me hints that where should i look.



    Then i head towards "/var/log/mysql/mysqld.log" for clues and definite got some of them. The error was saying that my last binary file was corrupted.



    Then i moved on to check the Indexing of MySQL Binary files. That information is stored in the file "/var/lib/mysql/mysql-bin.index". Then i removed the corrupted index from the file and move the binary file .




    Now its time to test, if the DB recovers and yes it does. The Index has been recreated itself. Then i did a SMT service restart which Worked as expected.





    Please do comment if any questions on this , I'll be happy to solve them if i can.




    No comments