Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Repair MySQL Database through Windows Command Line  (Read 4343 times)

0 Members and 1 Guest are viewing this topic.

sachinj

  • Guest
Repair MySQL Database through Windows Command Line
« on: January 27, 2018, 04:36:30 pm »
Repair MySQL Database through Windows Command Line
---------------------------------------------------------------------------------------------------------

1. Login to your Windows VPS using Remote Desktop.

2. Go to Start and locate Command Prompt. Right click Command Prompt and select Run as Administrator option.

3. At windows command prompt navigate to MySQL bin directory as follows.

Code: [Select]
cd C:\Program Files\MySQL\MySQL Server 5.5\bin  //  Replace your MySQL bin directory path here.
4. Run the following command to start the MySQL prompt.

Code: [Select]
mysql -u root -p
5. Enter MySQL root password when you are being asked.

6. You will see mysql prompt appearing. Now, to display all databases, type following command at mysql prompt:

Code: [Select]
show databases;
Enter the following command to repair MySQL database.

Code: [Select]
mysqlcheck -r [database] // Replace database name with your database name.
===========================================================================