-
Property Value Command-Line Format --secure-auth[={OFF|ON}]
Deprecated Yes System Variable secure_auth
Scope Global Dynamic Yes Type Boolean Default Value ON
Valid Values ON
If 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_name
System Variable secure_file_priv
Scope Global Dynamic No Type String Default Value platform specific
Valid Values empty string
dirname
NULL
This variable is used to limit the effect of data import and export operations, such as those performed by the
LOAD DATA
andSELECT ... INTO OUTFILE
statements and theLOAD_FILE()
function. These operations are permitted only to users who have theFILE
privilege.secure_file_priv
may 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_LAYOUT
CMake option, as shown in the following table. To specify the defaultsecure_file_priv
value explicitly if you are building from source, use theINSTALL_SECURE_FILE_PRIVDIR
CMake option.INSTALL_LAYOUT
ValueDefault secure_file_priv
ValueSTANDALONE
,WIN
NULL
(>= MySQL 5.7.16), empty (< MySQL 5.7.16)DEB
,RPM
,SLES
,SVR4
/var/lib/mysql-files
Otherwise mysql-files
under theCMAKE_INSTALL_PREFIX
valueTo set the default
secure_file_priv
value for thelibmysqld
embedded server, use theINSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR
CMake option. The default value for this option isNULL
.The server checks the value of
secure_file_priv
at startup and writes a warning to the error log if the value is insecure. A non-NULL
value 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_priv
is set to a nonexistent path, the server writes an error message to the error log and exits. -