Home > Database > Mysql Tutorial > body text

MySQL command line options that affect option file processing

王林
Release: 2023-09-17 12:21:05
forward
627 people have browsed it

影响选项文件处理的 MySQL 命令行选项

Let's understand how MySQL command line options affect option file processing -

Many MySQL programs that support option files handle the following options. Because these options affect option file processing, they must be provided on the command line rather than in an options file. In order for it to work properly, each option must be provided before the other options, with the exceptions mentioned below -

−−print−defaults should be used immediately after −−defaults−file, −−defaults−extra−file, or −−loginpath.
Copy after login

On Windows, if server startup is done with the --defaults-file and --install options , you must first --install.

--defaults-extra-file=file_name
Copy after login

On Unix, read the above line in the options file after the global options file, but make sure it comes before the user options file and before the login path file on all platforms.

--login-path=name
Copy after login

It helps to read options from the specified login path in the .mylogin.cnf login path file. Login Path is a group of options that specify the correct MySQL server that must be connected to and the account that must authenticate.

To create or modify a login path file, you must use the mysql_config_editor utility.

mysql --login-path=mypath
Copy after login

By default, the mysql client reads the [client] and [mysql] option groups. For the above command, mysql reads [client] and [mysql] from the other option files, and [client], [mysql] and [mypath] will be read from the login path file.

The client program reads the login path file even if the --no-defaults option is used. To specify an alternate login path file name, the MYSQL_TEST_LOGIN_FILE environment variable must be set.

--print-defaults
Copy after login

It prints the program name and all options taken from the options file. Password value is masked.

The above is the detailed content of MySQL command line options that affect option file processing. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template