MySQL command line login environment: MySQL Sever 5.1 + MySQL command line tool problem: MySQL command line login Resolution: Command line Login Syntax: mysql–u username [–h hostname or IP address]–p password Description: User name is the user you logged in, host name Or the IP address is optional, if the local connection is not required, the remote connection needs to fill in, the password is the corresponding user's password. Note: www.2cto.com 1. This command is executed under Windows Command Line window, not mysql command line; 2. After entering-p can follow the password directly, you can also press ENTER, you will be prompted to enter the password, both are the same effect; 3. The –p password option is not necessarily to be at the end; 4. No spaces after –u,-H,-P. Example: [SQL]--local connection mysql–uroot-p--Remote connection Mysql–uwgb–hxxx.xxx.xxx.xxx–p
MySQL command line Login