Note: If your MySQL is not installed under the C drive, use the command to go to the bin directory in the MySQL installation directory for subsequent operations.
Here's how: for example, you install on the D drive. First input D: Enter to enter the D drive, and then enter the CD d:\ your MySQL installation directory \ Bin enter into the MySQL bin directory, you can do the following.
Enter the MySQL database by entering mysql-h localhost-u root-p carriage return
"-H" indicates the server name, localhost is the local address; "-U" is the database user name, root is the MySQL default username (can be changed to the user set up); "-P" is the password, if the password is set, it can be directly entered after-p, for example, the password is 12345678. The complete command for (mysql-h localhost-u root-p12345678 Note:-P with password directly can not have spaces ) if the password is not set, enter password is displayed, the direct carriage return.
Operation of MySQL database by cmd command-line program under Windows