Before starting this article, first make sure that your MySQL password is right or you will think of his way. The following words do not say much, let's take a look together.
First, enter cmd into the MySQL installation directory, and then into the bin directory, enter the mysqld-nt --skip-grant-tables
command.
This cmd window does not close first, opens another window to login MySQL or directly points MySQL Command Line Client
to enter the correct password, on OK!
Second, on your Windows, first press [start], then [run], input cmd and then enter, in this DOS form, CD to the MySQL Server 5.1in directory, and then use the MySQL command: mysql -u root -p
(enter), prompt: Enter PASSWO RD: Enter the password.
You may be able to appear after you enter a password:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
The error hint above. This is because your MySQL service does not restart, enter Msconfig into the [run]
The "state" in the figure above is the one that I started, and the show was stopped before it started, so here's how to start it.
Without administrator privileges, the following error occurs in the command prompt attached to the secondary school input net start MySQL:
The problem solving method is as follows:
Running in DOS net start mysql
does not start mysql! Prompt for system error 5; Deny access! Switch to administrator mode to start up. So we're going to run the CMD program as an admin to start MySQL.
So how to use the Administrator identity to run the CMD program?
1. In the Start menu, enter CMD in the search box, then right-click and choose to run as Administrator!
Wouldn't it be a hassle to start the MySQL service every day? So:
2. Right-click cmd Select "Attach to Start Menu" (U); This is the Start menu to find cmd,
3. Right-click to select Properties, select Shortcuts, and then select Advanced, run as Administrator in the selection, and then click OK!
Just open the Start menu and click the shortcut above to run cmd as Administrator!
This will net start mysql
not make a mistake to enter!
Summarize
The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.