Fix - Collection Max error, Cannot Connect to Server

Problem Statement


Recently one of our customers was unable to connect to Collection Max and receiving an error Cannot Connect to Server.

Error Message

 

Error while starting mysql: Fatal error: Can't open and lock privilege tables: Table '.\mysql\user' is marked as crashed and should be repaired. MySQL server would no longer start, instead giving a Fatal error: Can't open and lock privilege tables: Can't find file: 'filename'


Solution


Upon investigation, we noticed that MySQL service could not get started and throws above error. This error was fixed by repairing the database table as follows.

  1. Login to the server where MySQL server is installed. Open the command prompt with administrator privileges.
  2. Start MySQL server in safe mode (skipping user privileges table) by issuing following command.

    mysqld_safe --skip-grant-tables &
    
  3. Select the database in question by running following command.

    use database_name;
  4. Repair the table name running following command.

    repair table table_name;
  5. Restart the MySQL service.

    /etc/init.d/mysqld stop
    
    /etc/init.d/mysqld start

    SSD Windows


Recommended plans for database driven application: SSD Linux VPS and SSD Windows VPS.


  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to change phpMyAdmin password?

Following tutorial will guide you to reset the phpMyAdmin password. We assume that you have...

How to turn on/off Mysql strict mode in the Windows server?

By default in the windows server, the strict mode will be enabled on MySQL. Please refer to the...

How to generate MySQL (backup) dump from the command line in Windows VPS?

This article will assist you how to generate MySQL (backup) dump from the Command line in the...

How do I connect to MySQL server from phpMyAdmin?

This article will guide you on how to connect to MySQL server from phpMyAdmin. You can obtain...

Fix :: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found

Error Message ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no...