MySQL sometimes because of power off or other causes of the database corruption, the wrong message is as follows:
Mysql:can ' t Open file: ' Sdb_sessions. Myi '. (errno:145)
For more information, and the Support Center at
We can use MySQL's own mysqlcheck command to quickly fix all databases or specific data.
If your database host is on your own, and you can control it, it is recommended that you use MySQL's own repair tool Myisamchk.exe to repair, the following operations:
Stop the MySQL service before fixing it.
If it is a win host, open the command line and go to MySQL's/bin directory.
Executes the path where the Myisamchk-r database resides *. Myi
If it is a Unix-like host, use the MYISAMCHK-R database directory * directly. Myi
Use the command Myisamchk to repair the myi file of the database
The code is as follows |
Copy Code |
#/usr/local/mysql5/bin/myisamchk-c-r/bak/lib/mysql/yourealcn/biz_user.* Myisamchk:error: '/bak/lib/mysql/yourealcn/biz_user.frm ' is not a Myisam-table ——— Myisamchk:error: '/bak/lib/mysql/yourealcn/biz_user. MyD ' is not a Myisam-table ——— -Recovering (with sort) myisam-table '/bak/lib/mysql/yourealcn/biz_user. Myi ' Data records:20414 -Fixing Index 1 -Fixing Index 2 -Fixing Index 3 -Fixing Index 4 |
In fact, there is a simple way to open your myphpadmin, select the Can ' t open file: A table with the same name, a drop-down menu "checked", select "Fix"
1. Access to manage MySQL phpMyAdmin
2. Select your own database on the left
3. In the right then check the error message in the ' xxx ' table
4.
Scroll to the bottom of the screen, there is a Drop-down menu (with selected:), select "Repair table"
After the modification, and did not find any data loss, hurriedly backed up a database into the mail, backup is very important