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