Using MySQL with PHP expands and enhances the features you can offer on your website. One of the most popular methods of managing a MySQL database is through phpMyAdmin, which is already on most web servers.
将MySQL与PHP结合使用可扩展和增强您可以在网站上提供的功能。 管理MySQL数据库最流行的方法之一是通过phpMyAdmin,它已经在大多数Web服务器上。
Occasionally, database tables become corrupt and you are no longer able to access them or they don't respond as quickly as you'd like. In phpMyAdmin, the process of checking the table and repairing it so you can access the data again is fairly simple. Before you begin, make a backup of the database in case phpMyAdmin can't repair it.
有时,数据库表损坏,您将无法再访问它们,或者它们无法按照您希望的那样快速响应。 在phpMyAdmin中 ,检查表并进行修复以使您可以再次访问数据的过程非常简单。 在开始之前,请备份数据库,以防phpMyAdmin无法修复它。
在phpMyAdmin中检查数据库 ( Checking Your Database in phpMyAdmin )
- Log in to your web host. 登录到您的虚拟主机。
- Click the phpMyAdmin icon. If your host uses cPanel, look there. 单击phpMyAdmin图标。 如果您的主机使用cPanel,请看那里。
- Choose the affected database. If you only have one database, it should be chosen by default so you don't need to do anything. 选择受影响的数据库。 如果只有一个数据库,则默认情况下应选择该数据库,因此您无需执行任何操作。
In the main panel, you should see a list of your database tables. Click Check All to select all of them.
在主面板中,您应该看到数据库表的列表。 单击全部检查以选择所有它们。
At the bottom of the window just below the list of tables, there is a drop-down menu. Choose Check Table from the menu.
在表格列表下方的窗口底部,有一个下拉菜单。 从菜单中选择“ 检查表 ”。
When the page refreshes, you will see a summary of any table that may be corrupted. If you receive any errors, repair the table.
页面刷新时,您将看到任何可能已损坏的表的摘要。 如果收到任何错误,请修复该表。
phpMyAdmin修复步骤 ( phpMyAdmin Repair Steps )
- Log in to your web host. 登录到您的虚拟主机。
- Click the phpMyAdmin icon. 单击phpMyAdmin图标。
- Choose the affected database. 选择受影响的数据库。
In the main panel, you should see a list of your database tables. Click Check All to select all of them.
在主面板中,您应该看到数据库表的列表。 单击全部检查以选择所有它们。
Choose Repair Table from the drop-down menu at the bottom of the screen.
从屏幕底部的下拉菜单中选择“ 维修表” 。
When the page refreshes, you should see a summary of any tables that were repaired. This should fix your database and let you access it again. Now that it is fixed, it's a good idea to make that database backup.
页面刷新时,您应该看到已修复的所有表的摘要。 这样可以修复您的数据库,并让您再次访问它。 既然已修复,那么进行数据库备份是个好主意。
翻译自: https://www.thoughtco.com/repairing-mysql-database-with-phpmyadmin-2693966