How to solve errno: 145 in Mysql

Source: Internet
Author: User

This article tells you how to solve the errno: 145 error when using mysql. If you have any questions, try again.

As the saying goes, where can we leave without wet shoes by the river? Many inexplicable problems may occur when mysql is used more often.
Can't open file: '×××. myi' (errno: 145). This error is generally caused by damage to your database table files, probably because you moved the database files, of course, other reasons are not excluded.

The error code for the specific database is as follows:
Invalid SQL :......
MySQL error! : 1016 (Can't open file: '×××. myi' (errno: 145 ))

There are multiple solutions to this problem. If your database can be remotely linked or you can connect to your remote server desktop and your server system is Windows, you can:

Run-> cmd

Then: mysql-h host address-u username-p
Enter the password to connect to the database;
Use Database Name;
Enter the name of the table with a reapair table error and press enter to fix the problem. See the following figure.

In the second solution, if you can only run PHP code, it is also very simple. Write a PHP file, link it to the database, and put this Code:
Reapair table 'table name ',
Like sending "select *......" It is also possible to send data to mysql;

The third solution is simple. open myphpadmin and select "Can't open file": the table with the same name following it. Select "selected items" from the drop-down menu and select "Repair"

OK.

If your data warehouse is used by one user and you can still control it, it is suggested that you use mysql's self-contained Repair Tool myisamchk.exe to fix it. The operations are as follows:

Stop the mysql service before the fix.
If it is a Windows host, open the command line and enter the/bin directory of mysql.
Path of the database where myisamchk-r is executed *. MYI
For Unix-like hosts, directly use the myisamchk-r database directory *. MYI

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.