Mysql command line parameters

Source: Internet
Author: User

The mysql command line is familiar to everyone. Next we will introduce you to mysql command line parameters. If you are interested in mysql command line parameters, take a look.

Mysql [-u name [-p] [-h computername] [-protocol = name] [-P n] [-default-character-set = name] [databasename]

-U name is equivalent to -- user = name
The user logging on to the MySQL server. If this parameter is omitted, the current user is used by default in Linux and ODBC is used by default in Windows.

-P
If the logon user needs a password, the mysql Command will prompt you to enter the password.

-H computername is equivalent to -- host = computername
The address of the MySQL server. If it is omitted, it is connected to the local computer by default.

-- Protocol = name
Select the communication protocol used to connect mysql to the MySQL server. If the network is used, only one value of tcp is available. If the MySQL server is local, socketUNIX/Linux is available.) pipeWindows) or memoryWIndows) optional.

-P n is equivalent to-port = n.
The port number used for connecting mysql to the MySQL server. The default value is 3306.

-- Default-character-set = name
The port number used for communication between the mysql program and the MySQL server. The value must be consistent with the character set used by the current terminal. Otherwise, when the mysql program contains Chinese characters '? ').

Databasename
The database to be opened by mysql by default.

If you add the -- I-am-a-dummy option in mysql and send an UPDATE or DELETE statement without the WHERE or LIMIT keyword, the mysql program will reject execution.

The preceding section describes mysql command line parameters for your reference.

Mysql table index information

Create a temporary table in php mysql

Quick table creation in mysql

MySQL table management commands

Implementation of batch data import in MySQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.