MySQL command line login, mysql Command Line
Environment Introduction
OS: CentOS6.X & Win2003 & Win2008
MySQL version: 5.5.x
In addition to common MySQL management tools, MySQL client command line tools are often used.
1. Install the command line tool in Linux
(1) Enable epel Source:
(2) install the MySQL command line tool
# Yum-y install mysql
2. Common command lines:
# Mysql -- help
3. instance Syntax:
Mysql-u root-pxxxxx-h 127.0.0.1-P 23306
Mysql-u user name [-h host name or IP address]-p Password
Note: The user name is the user you log on to. The host name or IP address is optional. The local connection is not allowed, and the IP address and port must be used for remote connection.
Note:
1. lowercase-p is passwd, and uppercase-P is Port
2. The host name or IP address is optional. The local connection cannot be written, and the IP address and port must be written for the remote connection.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.