This article describes the MySQL based on DOS command line login operation method. Share to everyone for your reference, specific as follows:
The common MySQL command-line login statements are as follows:
Copy Code code as follows:
Mysql-h Localhost-u root-p123456
which
-H indicates server address, can be omitted, the default represents the native server
-U indicates that the logged-on user, required, can be written with the user name, such as:-uroot
-P indicates a database password, which is required, but does not enter a password here (note: There can be no spaces between-p and the password on the command line)
Therefore, the above statements can be written in the following ways:
Mysql-u root-p123456
mysql-uroot-p123456
mysql-u root-p
mysql-uroot-p
The post-logon effect is shown in the following illustration:
Enter the SQL statement test as follows:
This shows a data table that goes into the database emcs72 and prints the database.
For more MySQL commands and applications, interested friends can refer to the previous "MySQL Command instance rollup"
I hope this article describes the design of MySQL database to help.