Table of Content
    MySQL Database Repair

    How to Fix MySQL Error 1030: Got Error 127 from Storage Engine?


    Table of Content

      Summary: The Error 1030: Got error 127 from storage engine in MySQL can occur due to database corruption or any other reason. In this post, we will see how to fix this error using native tools in MySQL Server. We will also mention a dedicated MySQL database recovery tool that can easily repair the corrupt MySQL database and help fix the error.

      The error 1030, also called ER_GET_ERRNO, is an error related to the storage engine, which is the software component used by MySQL to access data from the database. The storage engine component reads, modifies, or deletes data from the database. MySQL includes two different storage engines – MyISAM and InnoDB. The latter is the default engine from version 8 of MySQL.

      When reading or writing the data, you may get the following error:

      Error: 1030 SQLSTATE: HY000 (ER_GET_ERRNO)
      Message: Got error %d from storage engine

      To get the complete error description, you can use the following command from the shell:

      perror 127

      The response will be like:

      Error code 127: Record-file is crashed.

      It looks there is a corruption issue.

      Let’s see how to fix this error.

      How to Fix MySQL Error 1030?

      MySQL provides commands to check and repair corrupted tables. Let’s see how to verify if a table is corrupted.

      To check if a table is corrupted, use the command CHECK TABLE as given below.

      CHECK TABLE <NAME_OF_THE_MYISAM_TABLE> [ , table2, table3, ..][option]

      The ‘Option’ parameter can have the values, such as FOR UPGRADE, QUICK, FAST, MEDIUM, EXTENDED, or CHANGED.

      For example:

      CHECK TABLE <NAME_OF_THE_MYISAM> FAST QUICK;

      The MyISAMCHK command provides information about a table when the engine used is MyISAM.

      This is the syntax:

      MyISAMCHK [option] < NAME_OF_THE_MYISAM_TABLE>

      Specify the –recover (or –r) option to perform data repair in the table. It will fix any problem, except problems related to unique key.

      For example:

      MyISAMCHK –r <NAME_OF_THE_MYISAM_TABLE>

      Repeat the same procedure for all the corrupt tables. Stop the MySQL service before executing data repair.

      If there are many damaged tables, the repair operation becomes lengthy, increasing the chances of mistakes while performing the operation. Due to this, the MyISAMCHK command may fail.

      At this point, it may be useful to use a tool developed specifically for MySQL database recovery.

      I suggest using Stellar Repair for MySQL. This tool, developed by Stellar, is very effective in repairing corrupted tables and database. It is also easy-to-use.

      Key features of this powerful software are:

      • Repairs corrupt MySQL database
      • Repairs MySQL database tables of both the storage engines – InnoDB and MyISAM
      • Repairs MySQL and MariaDB databases created on Windows and Linux
      • Fixes all types of MySQL corruption errors
      • Saves repaired files in several format – MySQL, MariaDB, SQL Script, CSV, HTML, and XLS

      Steps to use Stellar Repair for MySQL:

      • Download Stellar Repair for MySQL from the Stellar’s official website.
      • Choose whether you want to download the Windows version or the Linux version.
      • Press the Free Download button.
      Free Download button from choose Windows/Linux version from Stellar Repair for MySQL
      • Once downloaded, install the application by following the setup wizard.
      • When you launch the software, you’ll be asked to select a database to repair.
      Install application using setup wizard after download. Select repair database upon software launch.
      • Enter the path to the folder that contain database files. Press the OK button.
      Enter database folder path, press OK button for file location.
      • A dialog box will appear, if data files are in use. In this case, stop the MySQL Service and then start the recovery process again.
      If data files in use, stop MySQL Service, restart recovery process.
      • A dialog box shows the list of available databases. Choose the database file(s). Press the Repair button.
      Select from list of databases, choose file(s), Repair upon pressing
      • The tool will start scanning and repairing the database.
      Tool initiates database scan and repair process.
      • When the database is repaired, a Repair Complete dialog box will appear.
      After repair, Repair Complete dialog box appears.
      • Now, press the Save button.
      Save by clicking the Save button
      • Choose the format to save your data. By default, the selected format is MySQL. You can also choose from other formats, such as Maria DB, HTML, SQL Script, CSV, and XLS.
      • Enter host name, username, and password. Then, press the Save button.
      Select data format (MySQL, Maria DB, HTML, SQL Script, CSV, XLS), enter credentials of database, and save by pressing Save button
      • When the process is finished, a Save Complete dialog box appears. Click OK.
      Upon completion, Save Complete dialog box appears. Click OK

      Conclusion

      In this post, we have discussed in detail the MySQL error 1030: Got error 127 from storage engine. We have also mentioned the step-by-step process to fix this error using the MySQL MyISAMChk command. In case the MySQL repair command doesn’t work, you can use a dedicated MySQL database recovery tool, such as Stellar Repair for MySQL to repair the corrupt database and fix the error.

      Was this article helpful?

      No NO

      About The Author

      Bharat Bhushan linkdin

      Bharat Bhushan is an experienced technical Marketer working at Stellar Data Recovery - expertise in data care. He is skilled in Microsoft Exchange Database, MSSQL Database troubleshooting & data warehousing. He is a Management Post Graduate having a strong grip in Technology & certified in SAP-SD, Oracle 10g & Informatica Powercenter 9.1.

      Leave a comment

      Your email address will not be published. Required fields are marked *

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received