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