Common Options of the MySQL Client Tools : MySQL « Command MySQL « SQL / MySQL






Common Options of the MySQL Client Tools

       
-u un           --user=username                      Determines the user name for registration with MySQL.
-p              --password                           Asks for input of password immediately after start of the command.
-pxxx           --password=xxx                       Passes the password directly
-h hn           --host=hostname                      Gives the name or IP number of the computer on which the server is running.
                --protocol=name                      Determines which protocol should be used for communication between client and server. 
-W              --pipe                               Uses a named pipe for communication with the MySQL server. 
-C              --compress                           Minimizes the data flow between client and server by making use of data compression.
                --default-character-set=name         Specifies the character set for communication with the MySQL server (e.g., latin1 or utf8).
                --character-sets-dir="dir"           Specifies the directory in which the character set files are located (e.g., "C:/Programs/MySQL/MySQL Server 5.0/share/charsets"). 

   
    
    
    
    
    
    
  








Related examples in the same category

1.mysql Options
2.mysql Commands
3.Processing SQL Files with mysql
4.Change default-character-set for backup
5.Connect to the mysql database as the root user from the MySQL CLI
6.Connects the root account to the inventory database:
7.Connect to the MySQL database as root
8.Import a SQL-format dump file back into MySQL
9.If you dumped tables from a single database, you'll need to tell mysql which database to import them into
10.Verify whether the MySQL databases have been properly installed and configured.
11.Specify the user for mysql
12.To operate the mysql client utility in the context of the root user.
13.Specify a database when you start the mysql utility
14.To invoke mysql interactively from the command line, specify any necessary connection parameters after the command name
15.Provide a database name to select that database as the default database
16.Restoring a Single Database
17.Restoring Several Databases
18.Restoring a Database
19.Recreate the database in interactive mode:
20.Connect to the sampdb database on the local host and on cobra.snake.net:
21.Telling mysql to Read Queries from a File
22.MySQL Server and Included Administrative Tools
23.Producing HTML Output
24.Producing XML Output
25.Using the mysql Client to Export Data
26.Launching mysql with the option --silent:
27.XML Exporting with mysql
28.Sign into the MySQL server as root
29.The options part of the mysql command line might be empty
30.To determine the version of a program, use the --version option.
31.To determine the options supported by any MySQL program, invoke the program with the --help option.
32.Try out the various communication protocols
33.Find out which options will be taken from option files by mysql, use this command
34.Specifying Queries on the Command Line
35.To run multiple queries with the -e option, separate them with semicolons:
36.Getting Server Metadata
37.Produce output in formats other than tab-delimited
38.The prompt command supports a number of options that allow you to display the mysql prompt in various ways.
39.To connect to a server running on some other machine, it's necessary to specify the hostname using an -h option.
40.In many cases, a given option has both a long and a short form.
41.Connect with the same options as the previous example, but using the corresponding short option forms:
42.Generating HTML Tables