Home > Database > Mysql Tutorial > How to use the mysql command in Linux

How to use the mysql command in Linux

王林
Release: 2023-05-26 23:45:21
forward
1953 people have browsed it

Linux common commandsmysqlThe command is the client tool of the MySQL database server. It works in the command line terminal to complete the operation of the remote MySQL database server.

How to use the mysql command in Linux

Syntax format:

mysql [parameter] [database]

Common parameters:

##-uConnect to the MySQL server The user name of -e executes the MySQL internal command -p to connect to the MySQL server Password
-h The ip address or host name of the MySQL server
Reference example

Connect to the local MySQL server and open the database:

 [root@linux265 ~]# mysql -h localhost -u root -p lxlinux
Copy after login

Connect to the remote MySQL server:

 [root@linux265 ~]# mysql -h 192.168.60.60 -u root -p  lxlinux
Copy after login

The above is the detailed content of How to use the mysql command in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template