One, MySQL download installation
MySQL installation process is not said, basically, and the general software installation process is no different, is to point to next, set the root user password to keep in mind. For specific tutorials, refer to: http://jingyan.baidu.com/article/4b07be3c67853c48b380f311.html
MySQL Community Edition official: http://dev.mysql.com/downloads/windows/installer/, there are two files, one only a few m, and another hundreds of M. A few m is the Web installation version, equivalent to a downloader + installer. Hundreds of M is the full version. Personal suggestions to use the web version, and then perform the download installation, because the full version of the download is not generally slow ...
In addition the download page has generally Available (GA) version and development version, the previous one is similar to the stable version, the latter is similar to the beta version. It is recommended to download the previous one.
Second, MySQL landing use
After installation, the desktop will appear a shortcut, you can double-click the shortcut directly to login, MySQL database management system is the default mode of operation is the command line, if you want to use a graphical way, you can use Navicat, specific methods of their own Baidu. Or select it from the Start menu. However, the following two command-line shortcuts appear in the Start menu
The first is a command line that supports Unicode, and the second is a command line that supports only ANSI. If it involves the operation of Chinese, it is recommended to use the first command line, otherwise garbled characters may occur.
Double-click on the MySQL shortcut, the following window appears, enter the password set when installing the MySQL server (the default is the local server, is this machine).
The following window appears, indicating the success of logging on to the MySQL server.
If you enter a password and then flash back, the password is entered incorrectly, please enter the correct password. Please note: When installing MySQL new component, or after updating the MySQL program, there may be a landing flash, this is because MySQL will be updated after the root password reset to the default blank password, so the direct return can be logged in. Then change the password, the way to change the password is described later.
Third, MySQL login password modification method One: Using the Set password command
Execute the following command in case of login to the root account (note capitalization)
SET for ' Root '@'localhost'= PASSWORD ('newpassword' );
Replace the NewPassword in the above command with your new password, keeping the single quotation marks in mind.
Note: MySQL allows multiple commands to be executed at the same time, and the command executes only if the end of the command is a semicolon, so if you want to execute one command at a time, be sure to include a semicolon at the end of the command.
Method Two: Use the mysqladmin command
Similarly, log in to the root account
If the root password is still the default blank password, use the following command
-u root password "NewPassword";
If Root has already set a password, use the following command
-u root password OldPassword "NewPassword";
The OldPassword in the above command is your original password, newpassword for the new password you want to set, keep the double quotes in mind.
Method Three: Edit the user table directly with update
After logging in to the root account, execute the command:
use MySQL;
Represents the use of the MySQL database. Then execute the command:
UPDATE User SET = PASSWORD ('newpassword'WHEREuser='root ' ';
Final execution:
privileges;
Method Four: Lost password
This method forgets the password for the root account of MySQL on the Windows platform.
The previous three ways are to log in to the root account, for the forgotten root password, you need to log in to the root account, and then use any of the above three ways to reset the password.
Open the command line as an administrator, and then use the command Line CD command to enter the Bin folder in your MySQL sever installation directory, the default directory for version 5.6 is: C:\Program files\mysql\mysql Server 5.6\bin, That is, execute the command:
5.6\ Bin
。 After execution such as:
Note: For MySQL sever not installed on the system disk (as installed on the D drive), the Execute CD command needs to add the parameter/d, for example
5.6\ Bin
The path in the above command is your installation path.
Then, on the command line, enter:
net stop MySQL
Stop the MySQL service. The above MySQL for the installation of the name of the MySQL service, if the installation you modified the default service name, is to use your modified name. If you are prompted that the MySQL service is not installed, this step is skipped.
Open the MySQL installation directory and locate the My.ini file (my--default.ini renamed to My.ini if not). Open My.ini, add a line under [Mysqld]
True
That
Save the file, if you have denied access when you save the file to the desktop and then change it, and then put it back.
Then execute the following command on the command line (note: The brown string is the path to My.ini, the following is just my path):
Mysqld--defaults-file="C:\Program files\mysql\mysql Server 5.6\my.ini" -- Skip-grant-tables
Then execute the command to enter the root account
Mysql–u Root
This will indicate a successful entry to the root account:
You can then use any one of the three methods to reset the password. Finally, load the permissions table:
FLUSH privileges;
Let the new password take effect, if you have not changed, the password does not change.
Four, other error 1, open the command line client immediately after the Flash (double-click and then flash away)
Right-click Shortcut, properties, view the contents of the target edit box
Mine is.
" C:\Program files\mysql\mysql Server 5.6\bin\mysql.exe " " --defaults-file=c:\programdata\mysql\mysql Server 5.6\my.ini " " -uroot " " - P "
Open Default-file after the file path, found no My.ini, only my--default.ini file, rename this file to My.ini, problem solved.
2, open the command line client, enter the password and then flash back
In this case, the root password is basically wrong and requires a password reset. If you confirm that you entered the correct password, simply press ENTER to log in, and then change the password. This happens after you update, install, and uninstall some of the functional components of MySQL.
Reference:
Http://jingyan.baidu.com/article/0320e2c198ad5f1b87507bc8.html
http://my.oschina.net/artshell/blog/182539
Frequently asked questions about installing and configuring MySQL on Windows