MySQL Error #145 Solution summary

Source: Internet
Author: User

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

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.