Environment Introduction
Os:centos6.x & Win2003 & Win2008
MySQL version: 5.5.x
In addition to the common MySQL management tools, mysql client command-line tools are often used
1.Linux Installing the command-line tool
(1). Enable the Epel Source:
(2). Install the MySQL command line tool
# # Yum-y Install MySQL
2. Command line Common commands:
#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 logged in, the hostname or IP address is optional, the local connection is not writable, the remote connection must write the IP address and port.
Note:
1. Lowercase-P is passwd, capital-P is port
2. Host name or IP address is optional, local connection is not writable, remote connection must write IP address and port
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
MySQL command line Login