11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 27 • THE MANY MYSQL CLIENTSwww.it-ebooks.info• --port=port_num, -P: Specifies the port to use when connecting to the <strong>MySQL</strong> server.Note that you can’t just specify a nonstandard port (3306 is the default) withoutconfiguring the <strong>MySQL</strong> server daemon to listen on that port. You can do so simply bypassing this same option to the mysqld daemon at startup time.• --socket=/path/to/socket, -s: For localhost connections, a socket file is required. OnUnix machines, this file is created in /tmp by default. On Windows machines, thisoption determines the name of the pipe (by default this name is <strong>MySQL</strong>) used for localconnections when named pipes are used.• --user=name, -u: Specifies the connecting user’s username.General OptionsThe following list highlights many of the options available to all or most clients. You can verify whether aparticular client supports a given option by outputting the client’s help page with the option --help.• --compress, -C: Enables compression for the protocol used for client/servercommunication.• --defaults-file=/path/to/configuration/file: At startup, each client typicallysearches in several locations for configuration files and applies the settingsaccordingly. You can override this behavior by specifying the location of aconfiguration file with this option.• --defaults-extra-file=/path/to/configuration/file: Reads this file after all otherconfiguration files have been read. You might use such a file during applicationtesting, for example.• --help, -?: Outputs help information before exiting. You can pipe the results througha pager to facilitate reading. For example, the following command takes advantage ofthe Unix more command to page output:%>mysql --help | more• --no-defaults: Ignores all configuration files.• --print-defaults: Outputs the options that will be used by the client as defined withinconfiguration files and environment variables.• --silent, -s: Decreases client chatter, or output. Note that this option does notnecessarily suppress all output.• --variable-name=value: Sets a variable’s value. Note that the option isn’t actuallycalled “variable-name.” Rather, this is intended as a placeholder for the name ofwhatever variable you’re trying to modify.• --verbose, -v: Outputs more output than would occur by default.• --version, -V: Exits after outputting client version information.522

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!