MySQL command line logon environment: MySQL Sever 5.1 + MySQL command line tool problem: MySQL command line logon solution: Command Line logon Syntax: mysql-u user name [-h host name or IP address]-p password Description: the user name is your login user, the host name or IP address is optional, if it is a local connection is not required, for remote connection, enter the password corresponding to the user. Note: www.2cto.com 1. this command is executed in the Windows command line window, instead of the MySQL command line; 2. after you enter-p, you can keep up with the password directly, or press enter, and you will be prompted to enter the password, both of which have the same effect; 3. -The p password option is not necessarily at the end; 4. -u,-h, and-p are not followed by spaces. Example: [SQL] -- local connection to mysql-uroot-p -- remote connection to mysql-uwgb-hXXX. XXX-p
Reference: MySQL database command line tool
Http://www.bkjia.com/database/201209/154378.html