Home > Database > Mysql Tutorial > What is the command to open a database in mysql?

What is the command to open a database in mysql?

hzc
Release: 2020-06-18 14:35:11
Original
15212 people have browsed it

What is the command to open a database in mysql?

#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.

What is the command to open a database in mysql?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template