Home > Database > Mysql Tutorial > How to open mysql database from terminal

How to open mysql database from terminal

coldplay.xixi
Release: 2020-11-30 11:05:14
Original
15801 people have browsed it

How to open the mysql database from the terminal: First, under the Windows operating system, click [Start-Run]; then enter cmd, and click [OK]; finally enter the login MySQL database command [mysql - in the DOS window h 127.0.0.1 -u root -p].

How to open mysql database from terminal

The operating environment of this tutorial: Windows 7 system, mysql version 8.0.22. This method is suitable for all brands of computers.

How to open the mysql database from the terminal:

Under the Windows operating system, start - run, open the "Run" dialog box, enter cmd, and click "OK" You can enter the DOS window.

Enter the command to log in to the MySQL database in the DOS window

mysql -h 127.0.0.1 -u root -p
Copy after login

Command parameter description:

mysql is the command to log in to the database,

  • -h is followed by the IP of the server. Since the MySql server in this example is installed locally, the IP address is 127.0.0.1;

  • -u Followed by the user name, this example uses the root user 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

How to open mysql database from terminal

Related free learning recommendations: mysql video tutorial

The above is the detailed content of How to open mysql database from terminal. 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