Home > Database > Mysql Tutorial > Using option files for MySQL programs? Use of option files

Using option files for MySQL programs? Use of option files

PHPz
Release: 2023-09-09 16:17:07
forward
821 people have browsed it

使用 MySQL 程序的选项文件?选项文件的使用

Let us understand how to use options files with MySQL programs -

  • Most MySQL programs can read from Startup options option file, also known as configuration file.

  • Option files provide a simple way to specify commonly used options so that they do not have to be entered on the command line every time a user runs a program.

  • To find out whether the program reads the options file, call it with the -help option.

  • For mysqld, you can use --verbose and --help.

  • If the program reads option files, the help message indicates which files it needs to look for and which option groups it will recognize.

MySQL programs started with the -no-defaults option will not read other than .mylogin.cnf. Servers started with the persisted_globals_load system variable disabled do not read mysqld−auto.cnf.

Option Files

Many option files are plain text files created with any text editor. Exceptions are discussed below -

  • #The .mylogin.cnf file containing login path options.

  • This is an encrypted file created by the mysql_config_editor utility.

  • "Login Path" is an option group that only allows certain options: host, user, Password, port and socket.

  • The client program uses the --login-path option to specify which login path to read from .mylogin.cnf.

  • Specify the alternative login path file name, that is, MYSQL_TEST_LOGIN_FILE Environment variables must be set.

  • This variable is used by the mysql-test-run.pl test utility, but is also recognized by mysql_config_editor and MySQL clients such as mysql, mysqladmin, etc.

  • The mysqld-auto.cnf file in the data directory is a JSON-formatted file that contains persistent system variable settings.

    li>
  • Created by the server after executing SET PERSIST or SET PERSIST_ONLY

  • Management of mysqld-auto.cnf should be done by the server rather than executing Manually.

The above is the detailed content of Using option files for MySQL programs? Use of option files. 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