#What is the command to open the database in mysql?
Use the command line to connect to the MySQL database:
Under the Windows operating system, start - run, open the "Run" dialog box, enter cmd, click "OK" to enter DOS window.
Enter the login MySQL database command in the DOS window
mysql -h 127.0.0.1 -u root -p
Command parameter description:
mysql is the command to log in to the database. -h is followed by the server IP. Since the MySql server in this example is installed locally, the IP address is 127.0.0.1; -u is followed by the user name. In this example, the root user is used to log in; -p Followed by the login password.
Enter the above command and press Enter, then enter the login password and press Enter to complete the login to the MySQL database service. Then you can run the use databaseName statement to operate a certain database.
Recommended tutorial: "mysql tutorial"
The above is the detailed content of What is the command to open a database in mysql?. For more information, please follow other related articles on the PHP Chinese website!