Use the cmd command to connect to mysql bitsCN.com
To connect to mysql through the command window in cmd, you only need to input mysql-uroot-p123456 in the command line. the prompt "mysql is not an internal or external command" appears ". The solution is to add C:/Program Files/MySQL Server 5.6/bin in the path of the environment variable.
For example:
After configuring mysql to environment variables, enter "mysql-uroot-p123456" in the command window of cmd. For example:
Now you can use the cmd command to connect to the mysql database. Note that-u is followed by the username used to connect to the database, with no space. -P is followed by a connection password without spaces.
Command: mysql-uroot-p123456
If you add a semicolon to the end of the command, the following message appears:
C:/Users/Administrator> mysql-uroot-p123456;
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: Y
ES)
The solution is not to add extra points.
BitsCN.com