Mysql:--secure-auth、--secure-file-priv
-
Property Value Command-Line Format --secure-auth[={OFF|ON}]Deprecated Yes System Variable secure_authScope Global Dynamic Yes Type Boolean Default Value ONValid Values ONIf this variable is enabled, the server blocks connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Enable this variable to prevent all use of passwords employing the old format (and hence insecure communication over the network).
This variable is deprecated and will be removed in a future MySQL release. It is always enabled and attempting to disable it produces an error.
Server startup fails with an error if this variable is enabled and the privilege tables are in pre-4.1 format. See Section 6.4.1.3, “Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin”.
NotePasswords that use the pre-4.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided. Pre-4.1 passwords are deprecated and support for them is removed in MySQL 5.7.5. For account upgrade instructions, see Section 6.4.1.3, “Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin”.
-
Property Value Command-Line Format --secure-file-priv=dir_nameSystem Variable secure_file_privScope Global Dynamic No Type String Default Value platform specificValid Values empty stringdirnameNULLThis variable is used to limit the effect of data import and export operations, such as those performed by the
LOAD DATAandSELECT ... INTO OUTFILEstatements and theLOAD_FILE()function. These operations are permitted only to users who have theFILEprivilege.secure_file_privmay be set as follows:-
If empty, the variable has no effect. This is not a secure setting.
-
If set to the name of a directory, the server limits import and export operations to work only with files in that directory. The directory must exist; the server will not create it.
-
If set to
NULL, the server disables import and export operations.
The default value is platform specific and depends on the value of the
INSTALL_LAYOUTCMake option, as shown in the following table. To specify the defaultsecure_file_privvalue explicitly if you are building from source, use theINSTALL_SECURE_FILE_PRIVDIRCMake option.INSTALL_LAYOUTValueDefault secure_file_privValueSTANDALONE,WINNULL(>= MySQL 5.7.16), empty (< MySQL 5.7.16)DEB,RPM,SLES,SVR4/var/lib/mysql-filesOtherwise mysql-filesunder theCMAKE_INSTALL_PREFIXvalueTo set the default
secure_file_privvalue for thelibmysqldembedded server, use theINSTALL_SECURE_FILE_PRIV_EMBEDDEDDIRCMake option. The default value for this option isNULL.The server checks the value of
secure_file_privat startup and writes a warning to the error log if the value is insecure. A non-NULLvalue is considered insecure if it is empty, or the value is the data directory or a subdirectory of it, or a directory that is accessible by all users. Ifsecure_file_privis set to a nonexistent path, the server writes an error message to the error log and exits. -
浙公网安备 33010602011771号